Get entity as return of collection in entity framework

how to get entity as return of collection in entity framework,,, i dont have any idea...
when i select entity and then get column information then no column return .....

The way the Oracle provider works right now requires that you use a cursor, even if you want to map it to an entity. To map it to an entity, that cursor needs to contain the necessary columns to form the entity (ie: it's returning data from the same table).
Here's an example from one I have mapped:
CREATE OR REPLACE PROCEDURE ENVMSTR.P_ORG_UNIT_R_BY_STAFF
STAFF_ID_P IN NUMBER
, RESULT_CURSOR_P OUT SYS_REFCURSOR
) AS
BEGIN
OPEN RESULT_CURSOR_P FOR
select *
from dept_organizational_unit d
where deptorgunit_cd = (select deptorgunit_cd from staff where staff_id = STAFF_ID_P)
or deptorgunit_cd in ( select deptorgunitrel_parent_cd from dept_org_unit_relation
start with deptorgunitrel_child_cd = (select deptorgunit_cd from staff where staff_id = STAFF_ID_P)
connect by prior deptorgunitrel_parent_cd = deptorgunitrel_child_cd);
END P_ORG_UNIT_R_BY_STAFF;
web.config:
<add name="ENVMSTR.P_ORG_UNIT_R_BY_STAFF.RefCursor.RESULT_CURSOR_P" value="implicitRefCursor bindinfo='mode=Output'" />
With those things set up, I'm able to import the function and map it to the entity that represents the dept_organizational_unit table (that entity is called OrgUnit in the model, but it doesn't really matter what you call it). The interesting thing I found is that in this situation I didn't actually have to add config file entries for each column in the cursor, probably because it maps perfectly to the entity. If I was trying to use a complex type instead then I probably would (and the configuration required to do that gets horrific in a hurry).

Similar Messages

  • Returning VB collections through OLE

    We are creating a Forte OLE automation server which must interface
    with a VB Collection.
    We have successfully passed a collection from VB to Forte. Forte
    receives this parameter as type CDispatch (determined using
    GetClassType().Name).
    We want to add items of type ValueItem to this collection.
    ValueItem was generated from another VB component using olegen,
    so it has a CDispatch interface.
    We don't seem to be able to use the CDispatch.InvokeMethodWithResult
    to execute the method Collection.Add. This is due to the fact that
    ValueItem is a subclass of CDispatch and we must pass an array of
    variant to InvokeMethodWithResult.
    Has anybody done something similar to this?
    Thank you,
    Keith

    I'm not sure why do you need a REMOTE interface for your Entity bean...
    Anyway you never return a collection of entities from a finder, but coleection of primary keys (BMP).
    public Collection ejbFindBySurname(String Apellido1) throws FinderException
    ArrayList list = null;
    try
    Connection con = getConnection();
    try
    PreparedStatement pstmt = con.prepareStatement("select IDAbonado from Abonado where Apellido1 like ?");
    try
    pstmt.setString(1, Apellido1 + '%');
    ResultSet rs = pstmt.executeQuery();
    list = new ArrayList();
    while(rs.next())
    int index = rs.getInt(1);
    list.add(new Integer(index));
    finally { pstmt.close(); }
    finally { con.close(); }
    catch (Exception ex) { throw new FinderException(ex.getMessage()); }
    return list;
    ArrayList is Serializable
    But I prefer to use a local interface to enty in pair with SlSB
    public ArrayList findBySurname(String surname)
    ArrayList list = null;
    try
    Collection c = abonadoHome.findBySurname(surname);
    list = new ArrayList(c.size());
    Iterator i = c.iterator();
    while(i.hasNext())
    list.add(((LocalAbonado)i.next()).getMyInformationMethod();
    catch(Exception ex)
    ex.printStackTrace(System.err);
    throw new EJBException(ex);
    return list;
    Note, I do not use narrow, coz I do not use remote call.
    Cheers

  • Explaining a WD Error: "Entity Instance Does Not Match Expected Entity"

    Hello,
    I'm wondering if someone can help me understand what is causing a persistent web server error that seems to be related to entities and/or instance creation. Lately, after building with screens and clicking on the top-level goal, I'll get this generic error:
    An error occurred trying to process your request.
    This error has been logged and is available in the application logs.
    For support and assistance please contact [email protected].
    I then check the Embedded Web Server Output, and see the text pasted at the bottom of this post - the key error seeming to be "java.lang.IllegalArgumentException: Entity instance does not match expected entity".
    Observations:
    - It seems to occur after I've made some significant changes to my data model: merging two entities, or switching relationships to being inferred.
    - There are no errors or warnings in the "Error List" and all documents are compiling successfully.
    - It only happens when I build with screens. I can 'build', or 'build and debug' without screens successfully.
    - The most recent occurrence was after I had converted a few relationships to "Inferred" and resolved all compiling errors.
    - It only occurs after clicking on the top-level goal, and sometimes a few screens afterwards. By switching most of my relationships back to non-inferred (except for one), I've been able to get some of the screens working - up until I arrive at the screen that involves creating instances for the second entity involved in the remaining inferred relationship.
    - The remaining inferred relationship that I was suspecting as a cause seems to be working correctly (i.e. I can see that the instances were connected in the Data tab, even after the error has appeared in the web output).
    I would be very grateful for any assistance with this error, as it's become somewhat of a time sink and I've already tried a few angles for troubleshooting it.
    Thanks!
    - Patrick
    Embedded Web Server Output:
    Deploying application
    Jul 18, 2011 2:35:18 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
    INFO: validateJarFile(C:\projects\[project name]\Release\web-determinations\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
    Server startup complete!
    OK - Tomcat server started
    4 [http-127.0.0.1-9000-Processor4] ERROR com.oracle.determinations.web.platform.servlet.WebDeterminationsServletUtility - java.lang.IllegalArgumentException: Entity instance does not match expected entity
    java.lang.IllegalArgumentException: Entity instance does not match expected entity
         at com.oracle.determinations.engine.local.RelationshipRule.backwardChainInternalItem(RelationshipRule.java:209)
         at com.oracle.determinations.engine.local.RelationshipRule.backwardChainRelationshipItem(RelationshipRule.java:132)
         at com.oracle.determinations.engine.local.eval.RelationshipExpression.backwardChain(RelationshipExpression.java:216)
         at com.oracle.determinations.engine.local.eval.ExpressionEvaluation.backwardChain(ExpressionEvaluation.java:102)
         at com.oracle.determinations.engine.local.RuleTableValue.backwardChain(RuleTableValue.java:264)
         at com.oracle.determinations.engine.local.eval.ExpressionAttributeRef.backwardChain(ExpressionAttributeRef.java:122)
         at com.oracle.determinations.engine.local.eval.SimpleExpression.backwardChain(SimpleExpression.java:101)
         at com.oracle.determinations.engine.local.eval.SimpleExpression.backwardChain(SimpleExpression.java:101)
         at com.oracle.determinations.engine.local.eval.ExpressionEvaluation.backwardChain(ExpressionEvaluation.java:102)
         at com.oracle.determinations.engine.local.RuleTableValue.backwardChain(RuleTableValue.java:264)
         at com.oracle.determinations.engine.local.eval.ExpressionAttributeRef.backwardChain(ExpressionAttributeRef.java:122)
         at com.oracle.determinations.engine.local.eval.SimpleExpression.backwardChain(SimpleExpression.java:101)
         at com.oracle.determinations.engine.local.eval.SimpleExpression.backwardChain(SimpleExpression.java:101)
         at com.oracle.determinations.engine.local.eval.ExpressionEvaluation.backwardChain(ExpressionEvaluation.java:102)
         at com.oracle.determinations.engine.local.RuleTableValue.backwardChain(RuleTableValue.java:264)
         at com.oracle.determinations.engine.local.eval.ExpressionAttributeRef.backwardChain(ExpressionAttributeRef.java:122)
         at com.oracle.determinations.engine.local.eval.SimpleExpression.backwardChain(SimpleExpression.java:101)
         at com.oracle.determinations.engine.local.eval.SimpleExpression.backwardChain(SimpleExpression.java:101)
         at com.oracle.determinations.engine.local.eval.SimpleExpression.backwardChain(SimpleExpression.java:101)
         at com.oracle.determinations.engine.local.eval.SimpleExpression.backwardChain(SimpleExpression.java:101)
         at com.oracle.determinations.engine.local.eval.SimpleExpression.backwardChain(SimpleExpression.java:101)
         at com.oracle.determinations.engine.local.eval.ExpressionEvaluation.backwardChain(ExpressionEvaluation.java:102)
         at com.oracle.determinations.engine.local.RuleSimpleValue.backwardChain(RuleSimpleValue.java:212)
         at com.oracle.determinations.engine.local.eval.ExpressionAttributeRef.backwardChain(ExpressionAttributeRef.java:122)
         at com.oracle.determinations.engine.local.eval.RelationshipExpression.backwardChain(RelationshipExpression.java:223)
         at com.oracle.determinations.engine.local.eval.SimpleExpression.backwardChain(SimpleExpression.java:101)
         at com.oracle.determinations.engine.local.eval.SimpleExpression.backwardChain(SimpleExpression.java:101)
         at com.oracle.determinations.engine.local.eval.ExpressionEvaluation.backwardChain(ExpressionEvaluation.java:102)
         at com.oracle.determinations.engine.local.RuleSimpleValue.backwardChain(RuleSimpleValue.java:211)
         at com.oracle.determinations.engine.local.eval.ExpressionAttributeRef.backwardChain(ExpressionAttributeRef.java:122)
         at com.oracle.determinations.engine.local.eval.ExpressionScopeSelect.backwardChain(ExpressionScopeSelect.java:40)
         at com.oracle.determinations.engine.local.eval.SimpleExpression.backwardChain(SimpleExpression.java:101)
         at com.oracle.determinations.engine.local.eval.ExpressionEvaluation.backwardChain(ExpressionEvaluation.java:102)
         at com.oracle.determinations.engine.local.RuleTableValue.backwardChain(RuleTableValue.java:264)
         at com.oracle.determinations.engine.local.eval.ExpressionAttributeRef.backwardChain(ExpressionAttributeRef.java:122)
         at com.oracle.determinations.engine.local.eval.SimpleExpression.backwardChain(SimpleExpression.java:101)
         at com.oracle.determinations.engine.local.eval.RelationshipExpression.backwardChain(RelationshipExpression.java:223)
         at com.oracle.determinations.engine.local.eval.SimpleExpression.backwardChain(SimpleExpression.java:101)
         at com.oracle.determinations.engine.local.eval.ExpressionEvaluation.backwardChain(ExpressionEvaluation.java:102)
         at com.oracle.determinations.engine.local.RuleSimpleValue.backwardChain(RuleSimpleValue.java:211)
         at com.oracle.determinations.engine.local.LocalAttribute.backwardChain(LocalAttribute.java:562)
         at com.oracle.determinations.engine.local.LocalAttribute.getRelevanceReport(LocalAttribute.java:515)
         at com.oracle.determinations.interview.engine.local.AttributeGoal.getNextScreen(AttributeGoal.java:113)
         at com.oracle.determinations.interview.engine.local.LocalInterviewSession.getNextScreen(LocalInterviewSession.java:213)
         at com.oracle.determinations.web.platform.controller.actions.InvestigateAction.submit(InvestigateAction.java:99)
         at com.oracle.determinations.web.platform.servlet.WebDeterminationsServlet.doPost(WebDeterminationsServlet.java:102)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
         at com.oracle.determinations.web.platform.util.CharsetFilter.doFilter(CharsetFilter.java:46)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:879)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
         at java.lang.Thread.run(Unknown Source)
    Edited by: Patrick Devine on Jul 18, 2011 3:23 PM

    Hi Patrick,
    The bad news is that your issue is due to a bug in the Determinations Engine. The good news is that there is a workaround. Basically there’s an implied directionality for all relationships which, for inferred relationships is defined by the direction in which you declared the relationship in the properties file. The problem only happens if you write your membership rule in the reverse direction to the one in which it was originally declared. In your case because your membership rule concludes the relationship ‘the benefits of the benefit plan’ you need to make sure that your relationship was declared in that direction as well. To do that, you’ll need to delete your existing relationship in the properties file and then create it as follows:
    Source: the benefit plan
    Target: the benefit
    Relationship Type: Inferred (Many to Many)
    Text: the benefits of the benefit plan
    Reverse Text: the benefit plan of the benefit
    We will fix the issue in the next release.
    Thanks,
    Kristy

  • Why does iTunes U site manager log me out when returning to collection manager?

    So here's the problem ... kind of a weird thing has been happening lately with Site Manager.  When I click on the feed of a collection to interact with the actual content (change the order, correct a typo etc.) and then click to return to collections manager, the site logs me out.  When I log back in, it won't let me go back into the collection and gives an error message saying that the collection is unavailable because someone is already logged in to it.  When I wait an hour or so, I can access the collection feed again but once I return to collections manager, I get logged out.  I have tried this on different versions of Safari and in Lion with the same results.  It is just in the last couple of weeks that this has been happening.  Any ideas?

    You are welcome, WonderProfessor.
    Updating iTunes may not be the reason at all. It could very well be the Support Team has fixed the problem, which i think is the case.
    Also, I learned i should report EACH problem to iTunes U Support Team using its Report Form:
    https://ssl.apple.com/support/itunes-u/public-site-manager/contact.html
    I used the Report Form a couple of months ago to report a different problem. One tech support person responsded and I have been emailing to that individual via email about a few more issues since then. This, however, is NOT a good practice. Reporting each problem using the report form will help the iTunes Support Team to prioritize the work based on urgency. 
    Anyway, I am releaved it is working now. Thank you. And thanks to the iTunes U Support Team and iTunes U Editors.
    Q. Wang

  • How to get the values returned by a function in a drop down?

    Hi All,
    Can anyone please help in getting the values returned by a function into a drop down? I have a java class file where in i have written a function called getWeeks() which give all the week dates and i want to display these week dates in a drop down box in a JSP page.
    Please help me in this regard.
    Thanks in Advance!!
    Lakshman.

    Hi Lakshman,
    the following code can help you do what you want :
    <hbj:dropdownListBox id="calendar" tooltip="Calendar" selection="<%= selected %>">
    <%
    String[] weeks = myObjectBean.getWeeks();
    for (int i = 0; i < weeks.length; i++) {
    %>
         <hbj:listBoxItem key="<%= i %>" value="<%= weeks<i> %>"/>
    <%
    %>
    </hbj: dropdownListBox>
    The <%= selected %> snippet allows you to pre-select one of the options (provided that the variable 'selected' is equal to one of the listBoxItem keys).
    You can also add onSelect to the tag (e.g. = "setSelectedItem"). It corresponds to a method in the corresponding JSPDynPage class. This means that when you select another item in the dropdown list, the method in your Java class is performed (allowing you to save the selected value and performing actions with it)
    I hope this helped you enough,
    kind regards,
    Frederic
    Edited seven times by: Frederic Taes on Nov 5, 2008 11:24 AM -> the onSelect element was in the hbj tag and in the text with "='setSelectedItem'" next to it and when I tried to post my message, I got a 501 error all the time ! Seems like a SDN bug to me ...

  • How to get the list of site collections in wss 2.0 and wss 3.0

    Hi,
    How to get the list of site collections in wss 2.0 and wss 3.0
    Please provide related articles to me
    Thanks in advance

    Use 11 for wss 2.0 and 12 for wss 3.0
    Go to :\Program Files\Common Files\Microsoft Shared\web server extensions\11\BIN\”
    stsadm.exe -o enumsites -url <root url>
    to get the list  of site collections and 
    stsadm.exe -o enumsubwebs -url <root url>
    to get the list of sub sites.
    http://support.microsoft.com/kb/832807
    http://ServerName/_layouts/1033/Siteusrs.aspx to manage permissions

  • How to get the Folders and subfolders collection in Project Manager

    Hi,
    I am trying to get the folders and subfolders collection in Project Manager, so that I will be able to loop through the collection and be able to create a project under the appropriate folder.
    Any suggestions?
    Thanks.
    Bhanu

    Anything you do without submitting to form has to be done on the client side (ususally by JavaScript) using data which has been send already from the server.
    With JavaScript you can do quite a bit. You can download tables which don't necessarilly appear on the screen, loading them into JavaScript arrays by dynamically generating javascript. Then you can pick up events like drop-box selection and use these tables to chose what you do next (e.g. preloading other fields, setting drop box content etc.).
    Or, you can cause forms to be submitted when actions like a selection happen without the user clicking a button. It's generally a matter of how much data you'd need to transmit.
    Another posibility is to use a Java applet, which can generate requests to the server and handle the results as it chooses. That are a number of problems with that but occasionally it's the best solution.
    What you can't do is to handle user input inside a JSP. The JSP has come and gone before the user even gets to see your form.

  • After I run a query can I get it to return the number of files matched and each individual file name?

    After I run a query can I get it to return the number of files matched and each individual file name?  I am trying to do a data mining routine and this would be helpful. 
    BBANACKI

    Hi bbanacki,
    Please have a look at the following code:
    Define your queries and then:
    oAdvancedQuery.ReturnType=eSearchFile
    oMyDataFinder.Results.MaxCount = iMaxNumberOfReturndElements
    Call oMyDataFinder.Search(oAdvancedQuery)
    Set oMyResults  = oMyDataFinder.Results
    If oMyResults.IsIncomplete Then
      msgbox "The first " & str(oMyResults.Count) & " files found"
    Else
      msgbox str(oMyResults.Count) & "  files found"
    End If
    for iLoop = 1 to oMyResults.Count
      Cell.Text = oMyResults(iLoop).Properties("Name").Value
      Cell.Text = oMyResults(iLoop).Properties("fullpath").Value
    next
    Greetings
    Walter

  • My screen opened, and with every click the page (letters/images) got bigger. I can not get it to return to normal image size. I have to use the slide bar to read across the page. What do i do to correct it back to normal size???

    Question
    My screen opened, and with every click the page (letters/images) got bigger. I can not get it to return to normal image size. I have to use the slide bar to read across the page. What do i do to correct it back to normal size???

    Hi jholzworth,
    It sounds like you might have accidentally hit the zoom button. Try hitting ''CTRL + 0'' to return it to normal size. Just so you are aware, ''CTRL'' and ''+'' will zoom in and ''CTRL'' and ''-'' will zoom out.
    Hopefully this helps!

  • If the result from the stored procedure returns 0 rows I get this error returned:

    If the result from the following stored procedure returns 0
    rows I get this error returned:
    faultCode:Server.Processing faultString:'Variable transfers
    is undefined.' faultDetail:''
    How can I get round this?

    Well if I try this in a cfm page:
    <cfstoredproc procedure="GetTransfers"
    datasource="datasource" returncode="true">
    <cfprocparam type="in" cfsqltype="CF_SQL_VARCHAR"
    value="4">
    <cfprocparam type="in" cfsqltype="cf_sql_date"
    value="12/09/2006 08:42:00">
    <cfprocparam type="in" cfsqltype="cf_sql_date"
    value="12/09/2008 08:42:00">
    <cfprocresult name="transfers">
    I get an error like:
    [Macromedia][SQLServer JDBC Driver][SQLServer]Procedure or
    function 'GetTransfers' expects parameter '@fromdate', which was
    not supplied.
    But this procedure only accepts 3 parameters.

  • I clicked on Full Screen under options and now I cannot get it to return to the regular screen. Please help. I have Windows 7, Acer Laptop Aspire.

    Under original start up screen with Firefox in orange at the top, I clicked on options and clicked on Full Screen. Now I cannot get it to return to the original state. What do I do? Thank You.

    What happens if you press the F11 key?

  • I keep getting "undelivered mail returned to sender" that comes with an attachment. I have not opened the attachment but the email returned is usually from people that i have not emailed in a long time.

    I keep getting "undelivered mail returned to sender" that comes with an attachment. i do not open the attachment but i get email returned from people that i have not emailed in years. I also have current people that tell me they receive email from me and there is nothing on the email and it is a repetative thing for them and for me. I have scanned my computer and it keeps telling me there are no viruses but i keep getting these emails. can anyone help me please!

    Someone is probably sending spam with your address forged on the To: line.  Could be one of your old contacts with a Windows machine has a virus that's doing it.  It's also possible your e-mail account has been hacked, though I'd think such a hacker would be a bit more purposeful.
    For more information, see:
    http://www.reedcorner.net/guides/macvirus/is_it_malware.php#spam
    * Disclaimer: links to my pages may give me compensation, and should not be taken as endorsement of my services by Apple.

  • CI get doesn't return any data even though it exists

    I just created a new CI and seems like when testing it using the CI tester via Application Designer, the "Get" method doesn't seem to function appropriately. I'm able to "find" keys appropriately but when I "get" a certain key, or try to "get" it with specific criteria, there is no data returned. It is like the Get sees the data there, but defaults everything. Is there something I need to do to have the "Get" method hydrate the record data appropriately? BTW, this is the standard "Get" method created when I defined the new CI.

    I don't really know what you're describing but let me describe mine in more detail and maybe you'll understand the problem.
    1) I created a new component that has one page definition-- TL_PRD_RPT_TIME. This component is strictly used for interfacing and nothing more.
    2) For the component properties (use tab), the access search record is set to TL_RPTD_ELPTIME. The add search record, detail page and force search processing are empty. Under actions, only the Add and Update/Display are checked. For 3-tier execution, both component build and save are set to Default (application server).
    3) I created a new component interface that uses this component and has all the standard methods checked.
    4) so far I can find properly, and I can create "somewhat" properly. For create, the record seems to be inserted ok into the TL_RPTD_ELPTIME table but the response I get back from a create seems to be "empty"-- like the GET issues I'm having.
    Now, knowing the above, what do I need to do to get the GET method to return the data? Thanks.

  • Returning (bulk collect) clause with execute immediate

    db version 11.1.0.7
    trying to do a returning bulk collect but it is not working:
    -- my test table
    create table t as
    with f as (select rownum rn from dual connect by rownum <= 10)
    select
    rn,
    lpad('x',10,'x') pad
    from f;
    -- works as expected
    declare
    type aat is table of t%rowtype;
    aay aat;
    begin
    delete from t returning rn,pad bulk collect into aay;
    rollback;
    end;
    -- but the table I really want to do has many columns so I want to dynamically build list of columns for the
    -- returning clause. This way if the table changes the stored proc will not have to be modified
    -- fails PLS-00429: unsupported feature with RETURNING clause
    declare
    type aat is table of t%rowtype;
    aay aat;
    s varchar2(4000);
    begin
    s := 'delete from t returning rn,pad into :1';
    execute immediate s returning bulk collect into aay;
    rollback;
    end;
    -- tried a few other things:
    create or replace type t_obj as object (rn number,pad varchar2(10));
    -- PLS-00497: cannot mix between single row and multi-row (BULK) in INTO list
    declare
    nt t_obj;
    s varchar2(4000);
    begin
    s := 'delete from t returning t_obj(rn,pad) into :1';
    execute immediate s returning bulk collect into nt;
    rollback;
    end;
    -- works, but would require store proc changes if the table changes
    declare
    type t is table of number;
    type v is table of varchar2(10);
    vt v;
    nt t;
    s varchar2(4000);
    begin
    s := 'update t set rn = 10 returning rn,pad into :1,:2';
    execute immediate s returning bulk collect into nt,vt;
    rollback;
    end;
    /basically I want to dynamically build the list of columns with all_tab_cols and put the list into the returning clause
    but seems like I will have to hard code the column lists. This means whenever the table changes I will have to
    modify the store proc .. Any way around this?
    Thanks

    And with object type you were almost there. You forgot to create table of objects type:
    SQL> create or replace type t_obj as object (rn number,pad varchar2(10));
      2  /
    Type created.
    SQL> declare
      2      type aat is table of nt;
      3   aay aat;
      4   s varchar2(4000);
      5  begin
      6   s := 'delete from t returning
    SQL> declare
      2      type aat is table of t_obj;
      3   aay aat;
      4   s varchar2(4000);
      5  begin
      6   s := 'delete from t returning t_obj(rn,pad) into :1';
      7   execute immediate s returning bulk collect into aay;
      8   rollback;
      9  end;
    10  /
    PL/SQL procedure successfully completed.
    SQL> SY.

  • Powershell Get-CMDevice Failure on Large Collections

    We are getting an error with the Powershell 'Get-CMDevice' cmdlet with larger collections.  The line we are using is ......
    Get-CMDevice -CollectionName "Test All Desktops and Laptops"
    This works on the smaller collections but with this one we get the error.......
    Get-CMDevice : ConfigMgr Error Object:
    instance of __ExtendedStatus
    Description = "[42000][191][Microsoft][SQL Server Native Client 11.0][SQL
    Server]Some part of your SQL statement is nested too deeply. Rewrite the query or
    break it up into smaller queries.";
    Operation = "ExecQuery";
    ParameterInfo = "SELECT * FROM SMS_CombinedDeviceResources WHERE
    (ResourceID=16777223 OR ResourceID=16777224 OR ResourceID=16777226 OR
    ResourceID=16777227 OR ResourceID=16777228 OR ResourceID=16777229 OR
    ResourceID=16777244 OR ResourceID=16777250 OR ResourceID=16777251 OR
    ResourceID=16777260 OR ResourceID=16777272 OR ResourceID=16777273 OR
    ResourceID=16777274 OR ResourceID=16777275 OR ResourceID=16777278 OR ..............ResourceID=16780606  OR ResourceID=2097154624  OR ResourceID=2097154626  OR 
    ResourceID=2097154645  OR ResourceID=2097154873 ) ";
        ProviderName = "WinMgmt";
        StatusCode = 2147749889;
    Error Code:
    Failed
    At line:1 char:1
    + Get-CMDevice -CollectionName "Test All Desktops and Laptops"
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (Microsoft.Confi...etDeviceCommand:GetDe 
       viceCommand) [Get-CMDevice], WqlQueryException
        + FullyQualifiedErrorId : UnhandledExeception,Microsoft.ConfigurationManagement. 
       Cmdlets.Collections.Commands.GetDeviceCommand
    The collection we are querying has 668 machines in it (all direct membership).  
    I have tried using 'Set-CMQueryResultMaximum' to set the maximum to say 2000 but this still gets the same error.
    Environment : SCCM 2012 SP1 CU3 
    Has anyone else seen this or found a fix etc?

    Hi, MattB101. This has been fixed in R2.
    Check out my Configuration Manager blog at http://aka.ms/ameltzer

Maybe you are looking for

  • Error Deploying from NWDS

    Hello, I am attempting to deploy a DC that was built with Visual Composer in the NWDS and I am getting the following error: "The user can not be authorized, because doesn't own the (com.sap.engine.interfaces.security.ServiceAccessPermissiondc) permis

  • Is there a way to delete text between two strings?

    In Pages, is there a way to delete all text containted between two strings? For example, if I have a text document that looks like this: String 1 String 2 Unwanted text Unwanted text String 3 String 4 Is there was to delete the unwanted text between

  • LSMW with CI on System i and an additional Windows Application Server 4.70

    Hi together, I have a really tricky problem to realize a parallel processing LSMW Workload. In truth it isn't a problem to the parallel processing. It is a problem, how to declare the paths to the input files. The LSMW is splittet in four steps: 1. R

  • When I click the preview icon it does not load.

    When I click the Preview icon ti does not load. what can I do?

  • Process flow errors

    Hi all, I am upgrading owb from 10g R1 to 10g R2. Now, I can deploy and loading data for every mapping. When I am testing the process flow, I get the error message like this : ORA-01924: role 'OWB_O_OWBRTR2' not granted or does not exist ORA-06512: a