create a cursor of type ref

I'll have to use the HZ_PARTY_V2PUB package (it's part of the EBS, CDH, etc.) to create and manipulate organizations, people, etc.

The api calls return all TYPE objects (HZ_PARTY_V2PUB.ORGANIZATION_REC, PARTY_REC, etc.).

Unfortunately, it seems as if the TYPE objects cannot be returned to .NET applications and it not the UDT defined as objects.

So, is there a good way to select the values of a TYPE in a REF cursor or something similar that .NET can actually use?

Thank you

George

>
Unfortunately, it seems as if the TYPE objects cannot be returned to .NET applications and it not the UDT defined as objects.
>
The UDT will work with .NET, if you are using 11g.

See the documentation and the examples in the data provider Oracle for the .NET Developer's Guide
http://docs.Oracle.com/HTML/E10927_01/featUDTs.htm
>
Oracle (UDT) user-defined types and custom .NET TypesWith 11 g Release 1 (11.1.0.6.20), ODP.NET has the capacity to represent the UDT Oracle found in the database as custom in .NET applications types. UDT are useful for representing complex entities as a single object that can be shared between applications. Products Oracle, Oracle Spatial and Oracle XML DB, use their own complex types frequently.

To represent the UDT Oracle as .NET custom types, applications need to apply attributes .NET structures and custom classes and their public fields and properties

To perform a conversion between the UDT types and custom types, ODP.NET uses custom interfaces.

Tags: Database

Similar Questions

  • Fetch cursor object type ref

    Hello! I have a Ref Cursor already opened by an external procedure. I need to fetch it in a table of objects like this
    CREATE OR REPLACE TYPE TAB_CUSTOM AS TABLE OF REC_CUSTOM;
    where
    CREATE OR REPLACE TYPE REC_CUSTOM AS OBJECT
    (
         my_id     NUMBER(6)
            .......
           ,CONSTRUCTOR FUNCTION REC_CUSTOM RETURN SELF AS RESULT
    )
    NOT FINAL;
    /
    a correct columns, types and size of the open cursor ref.

    How can this be accomplished?

    Something like:

    declare
        v_custom_tbl TAB_CUSTOM := TAB_CUSTOM();
    begin
        loop
          v_custom_tbl.extend;
          v_custom_tbl(v_custom_tbl.count) := REC_CUSTOM(null,...);
          fetch ref_cursor
            into v_custom_tbl(v_custom_tbl.count).my_id,
                 v_custom_tbl(v_custom_tbl.count)....,
                 v_custom_tbl(v_custom_tbl.count)....;
          exit when ref_cursor%notfound;
        end loop;
        v_custom_tbl.delete(v_custom_tbl.count);
    end;
    /
    

    SY.

    Published by: Solomon Yakobson on June 29, 2012 09:13

  • REP-0737: must be a function of return type 'ref cursor.

    Hi all

    I have create a ref cursor query in reports 10 g. But it is giving error REP-0737: must be a function of return type 'ref cursor.

    Here is my code

    function QR_1RefCurDS return sys_refcursor is
    
     My_Cur Sys_Refcursor;
    begin
      Open My_Cur for select * from scott.emp order by deptno;
      return My_Cur
    end;
    

    fate of the screen.

    Ref_Cursor_in_reports10g.jpg

    Oracle Forms/Reports has a complete PL/SQL engine and (only) the SQL parser.

    However, the engine of forms/States PL / SQL and SQL Analyzer are at a level that was in the Oracle 8.0 database.

    So, in the forms/States functions/procedures and forms/States triggers, you can not use SQL commands that did not exist in the 8.0 database.

    The predefined SYS_REFCURSOR type is introduced in Oracle 9i.

    Use this:

    PACKAGE test_rc IS

    TYPE of rc_type IS REF CURSOR RETURN emp % ROWTYPE;

    END;

    FUNCTION RETURN QR_1RefCurDS Test_rc.rc_type IS

    test_rc.rc_type RC;

    BEGIN

    OPEN the RC to SELECT * FROM emp;

    RETURN rc;

    END;

    Kind regards

    Zlatko

  • Ref Cursor and type

    Hi all

    I finally got the job of procedure stored Ref Cursor but am stuck on the following. I have this package body:

    CREATE OR REPLACE PACKAGE BODY PACK_MYCURSOR AS
    PROCEDURE REFCUR)
    theuserid IN OUT users.user_id%type,
    UserFirstName to users_TableRows) IS
    BEGIN
    OPEN FOR UserFirstName
    Select * from users
    Where user_id = theuserid
    ;
    END REFCUR;
    END PACK_MYCURSOR;
    /

    Now it works fine, but I need to have fields of explisit in the select statement, such as "select user_id from users", but when I do that then I would get the error messages of "expression is of the wrong type." Someone knows how to fix this?

    Thank you.

    Declare your as WEAK rather than STRONG type ref cursor. In other words, do not specify return rowtype % ROWTYPE in your statement in the specification.

    Declare that:
    TYPE users_TableRows IS REF CURSOR;

    Phil

  • Need the difference between strong Ref Cursor and weak Ref Cursor examples

    Oracle 9.2

    It would be great if someone can help understand the differences between
    1 Strong Ref Cursors(return type)
    and
    2. weak Ref Cursor (no return type)

    What I read is weak ref Cursor as sys_refcursor is better to use the ref Cursor, because in the case of slider strong Ref object type that will be returned must be declared in advance. It dosent make sense to me?

    I start with the examples would be appreciate for advice

    Strong Ref Cursor

    create the package str_pack
    is
    type sref_type is ref cursor return emp % rowtype;
    SVAR sref_type;
    end str_pack;

    Create procedure st_proc (eid in number, c1 on str_pack.sref_type)
    is
    Start
    Open c1 to select empno, ename, sal from emp where empno = eid;
    end;

    declare
    str_pack.sref_type C1;
    type rec is RECORD (eid, ename varchar2 number (20), number of sal);
    SheikYerbouti rec;
    Start
    st_proc(10,C1);
    loop
    When exit c1% notfound;
    Fetch c1 into SheikYerbouti.
    end loop;
    Close c1;
    end;


    There could be errors in the above example but its basically to get a better understanding.

    For weak Ref Cursor

    procedure of the child

    Create procedure child_proc (in number, c1 on sys_refcursor eid)
    is
    Start
    Open c1 to select empno, ename, sal from emp where empno = eid;
    end;

    parent process

    Create procedure parent_proc (recnum varchar2)
    is
    p_retcur sys_refcursor;
    emp_row emp % rowtype;
    Start
    child_proc (eid, p_retcur);
    loop
    extract the p_retcur in emp_row;
    dbms_output.put_line(emp_row.empno ||) e '|| emp_row. Ename | "wins". emp_row. SAL);
    end loop;
    end parent_proc;

    Concerning
    @

    Hello

    the fundamental difference is to do with the compiling and linking of runtime type that occurs.

    The he should explain a lot more detail than I could ever!
    http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:1640161160708

    P;

  • How to create a cursor image with text in motion.

    I tried to create a cursor image with text that slides with images. I use the jquery.cycle2 slider plugin that works very well for a slider I have on a different cursor on the same page. I'm not sure why it does not work. If someone could help me that would be great. The code is below:

    HTML:

    < div class = 'fluid wmud' id = 'wmud_img' data-cycle-fx = 'scrollLeft '.

    data-cycle-pause-on-hover = "true".

    data-cycle-speed '4000' = >

    < div class = "fluid wmud_img" >

    "< img src ="... /morris_construction/images/slider4.png"/ >

    < div class = "fluid wmud_text" >

    < h3 > Pro Active: < / h3 >

    < p > we have highly qualified staff and a thorough knowledge of the industry is thus able to add value by providing solutions to customers proactively; often even before that questions arise.                We are also very receptive to requests from the client and provide quick turnaround times, often to meet extremely tight deadlines. < /p >

    < / div >

    < / div >

    < div class = "fluid wmud_img" >

    "< img src ="... /morris_construction/images/slider5.png"/ >

    < div class = "fluid wmud_text" >

    < h3 > Pro Active: < / h3 >

    < p > we have highly qualified staff and a thorough knowledge of the industry is thus able to add value by providing solutions to customers proactively; often even before that questions arise.                We are also very receptive to requests from the client and provide quick turnaround times, often to meet extremely tight deadlines. < /p >

    < / div >

    < / div >

    < div class = "fluid wmud_img" >

    "< img src ="... /morris_construction/images/slider6.png"/ >

    < div class = "fluid wmud_text" >

    < h3 > Pro Active: < / h3 >

    < p > we have highly qualified staff and a thorough knowledge of the industry is thus able to add value by providing solutions to customers proactively; often even before that questions arise.                We are also very receptive to requests from the client and provide quick turnaround times, often to meet extremely tight deadlines. < /p >

    < / div >

    < / div >

    < / div > <!--end of wmud-->

    JavaScript:

    " < script src =" http://malsup.github.com/jQuery.cycle2.js "> < / script > .

    < script type = "text/javascript" >

    {$(function()}

    $('#wmud_img').cycle ({}

    FX: 'scrollLeft ',.

    });

    });

    < /script >

    Try these demos:

    Cycle2 overlays

    Cycle2 Caption2 Plugin

    Nancy O.

  • PLS-00362: Invalid cursor return type; 'NUMBER' must be a record type

    Hello

    Having a little trouble with the following code example provided to http://www.dba-oracle.com/plsql/t_plsql_cursor_variables.htm:
      1  DECLARE
      2    TYPE t_ref_cursor IS REF CURSOR RETURN NUMBER;
      3    c_cursor  t_ref_cursor;
      4    l_row   NUMBER;
      5  BEGIN
      6    DBMS_OUTPUT.put_line('Strongly typed REF CURSOR using SCALAR type. Expect an error!');
      7    OPEN c_cursor FOR
      8      SELECT COUNT(*) cnt
      9      FROM   cursor_variable_test;
     10    LOOP
     11      FETCH c_cursor
     12      INTO  l_row;
     13      EXIT WHEN c_cursor%NOTFOUND;
     14      DBMS_OUTPUT.put_line(l_row);
     15    END LOOP;
     16    CLOSE c_cursor;
     17* END;
     18  /
      TYPE t_ref_cursor IS REF CURSOR RETURN NUMBER;
                           *
    ERROR at line 2:
    ORA-06550: line 2, column 24:
    PLS-00362: invalid cursor return type; 'NUMBER' must be a record type
    ORA-06550: line 2, column 3:
    PL/SQL: Item ignored
    In the code above, SELECT COUNT (*)... returns a NUMBER. I know it's an aggregation function, but it returns a single value.
    Why can't return a value in a column of a row in a NUMBER?
    How can I change the SQL code so that I can do this?

    Furthermore, I wonder about the use of FETCH with a count (*)... FETCH is supposed to fetch the next row... How it works when you select an aggregate as County?

    Thank you very much
    Jason

    >
    TYPE t_ref_cursor IS REF CURSOR RETURN NUMBER;
    *
    ERROR on line 2:
    ORA-06550: line 2, column 24:
    PLS-00362: Invalid cursor return type; 'NUMBER' must be a record type
    ORA-06550: line 2, column 3:
    PL/SQL: Ignored Element

    In the code above, SELECT COUNT (*)... returns a NUMBER. I know it's an aggregation function, but it returns a single value.
    Why can't return a value in a column of a row in a NUMBER?
    How can I change the SQL code so that I can do this?
    >
    The exception is in line 2: your cursor statement. And the answer is in the text that you access
    >
    The return value of a strongly typed REF CURSOR must be a folder that can be defined using % TYPE % ROWTYPE attributes or record structure.
    >
    You said the CURSOR to return a NUMBER. And as the text says, he must be a 'record '.
    >
    Furthermore, I wonder about the use of FETCH with a count (*)... FETCH is supposed to fetch the next row... How it works when you select an aggregate as County?
    >
    As you said already FETCH retrieves the next line, if any. A query is a request is a request. It returns a result set. A query that uses aggregates returns a result set. A query that does not aggregate returns a result set.

    Your simple COUNT (*) SELECT query returns a result set that consists of a LINE and a line a ONE COLUMN of type NUMBER. Although there is only one column in the result set, what is returned is a RECORD or a LINE. That's why you have to report your data cursor return type a document using the % ROWTYPE or % TYPE attributes or a record structure.

  • How to create a custom data type

    Hello

    I'm using Labview 2009 and I am trying to create a custom data type and link it to the global variable that will be deployed in cRIO 9073. I couldn't find a method to achieve this. Please suggest a way to do this.

    Thank you

    Guilhem

    Right-click on a control and go to advanced-> customize.  This will open the control editor.  Change the type of a control to a Type def.  Customize if necessary and save the control.

  • When you use Word or Windows Mail my cursor to type goes in all directions without warning.

    When you use Word or Windows Mail my cursor to type goes in all directions without warning? What is the problem?

    Hi, the Dalesman,

    Using a laptop?  Make sure that your hand is not sweeping the touchpad while typing.

    HP Support document

    Troubleshooting of mouse - mouse cleaning details

    http://h20000.www2.HP.com/bizsupport/TechSupport/document.jsp?lang=en&cc=us&TaskID=110&prodSeriesId=3432827&prodTypeId=12454&ObjectID=c00006616

    Good luck!

  • Houston-25009: failed to create an object of type: java.sql.Timestamp type: java.lang.String

    System.out.println ("New Record");

    BindingContext exDup13 = BindingContext.getCurrent ();

    System.out.println ("kjjk45345323245");

    DCBindingContainer dbDup13 = (DCBindingContainer) exDup13.getCurrentBindingsEntry ();

    System.out.println ("kjjk45345345");

    DCIteratorBinding iterDup13 = dbDup13.findIteratorBinding("XYZIterator");

    System.out.println ("kjjk45345345");

    ViewObject voDup13 = iterDup13.getViewObject ();

    System.out.println("bipin:"+voDup13);

    voDup13.setWhereClause ("ID_NO ='" + idNoBnd.getValue () m:System.NET.SocketAddress.ToString () + "'");

    System.out.println("bipin1:");

    voDup13.executeQuery ();

    System.out.println ("bipin2:");

    voDup13.next ();

    System.out.println("kjjre:"+voDup13.GetRowCount());)

    When I am trying to run this code, I get error at last line.

    Error is:

    Houston-25009: failed to create an object of type: java.sql.Timestamp type: java.lang.String with value: 890089

    You can try using getEstimatedRowCount() instead of getRowCount() as:

    System.out.println ("16:"+voDup13.getEstimatedRowCount());

    If you still get error try to getEstimatedRowCount() before defining where clause and see if the error will come up again or not

  • I need to create a curved with type text box that heal and return to the next line in the form of curved text. How do I do that?

    I need to create a curved with type text box that heal and return to the next line in the form of curved text. How do I do that?

    1. Draw a set of concentric half circles also spaced, stacked so that the outermost is the most remote.
    2. Use the text tool to add text to the outermost path, thus creating a PathType object.
    3. Select all the paths. Type > threaded text > create.
    4. Text tool: click at the end of the text in the object of PathType. Continue typing.

    > If I do that it will not type more.

    A Warp effect is a direct effect. When it is applied to the type of objects, they are still editable text. The chain will deform, however, the text also, not only the paths to which it is attached. Sometimes you want that, sometimes you don't have.

    JET

  • What happened to the image field when you create a field of type of image for the Web application?

    What happened to the image field when you create a field of type of image for the Web application?

    The answer is that the point of the IMAGE has been changed to the MEDIA.

    Sorry, Ian, what research for this discussion, I got no results. All good and thanks for the carillon. Hope everything goes well.

    Mouma

  • invisible cursor of type tool... need help!

    invisible cursor of type tool... need help!

    Update MAVERICKS 10.9.1 SOLVES this problem! Thank you!

    Mike

  • options of workflow while creating the new project type

    Hey Dina,

    I have a doubt on below 2 options that are available in the "Project status, Workflow" tab while creating a new project type.

    Activate the workflow for projects
    Activate the workflow for Budgets

    Could you explain what what will be the exact flow of two work above, impact if we allow them when creating new project type.

    Thanks in advance,
    RPD

    Hello

    These two options will affect any new project created using the type of project you are developing.
    For example, you create a project type called "Capital Construction Projects", designated for individual projects that will be created when your company began construction of a new factory or office, for its own operations.
    For this type of project, you can enable the flow of project work and budgets.

    Later business user creates a new project of this type, for the construction of offices for a new Department, he or she will submit the project for approval. By using the workflow your company would install rules so that system knows which should be the approver of this creation of project, or later, any change in the status of the project.
    Once that project was created the business user need to budget for the expected costs of this investment. Another workflow is now used to submit the budget for approval.

    If unnecessary business rules a formal process for approval of two state changes of project or the base line of the budget of the project, then you need not enable these options for the type of project.

    Dina

  • How to create a cursor on a statement select union?

    Hello
    Using Oracle 10 g RAC + ASM (VERSION 1002000300)
    What is the right way to create a cursor on a statement select union?
    Is this possible?

    lines, results in code error PLS-00201: sT: = crsR.STATUS; sS: = crsR.TIME;

    Procedure below:
    -----
    CREATE OR REPLACE PROCEDURE BUILD_SUMMARY IS

    CsrO CURSOR IS
    SELECT
    STATUS,
    TIME
    DE)
    SELECT
    STATUS OF SUBSTR (DESCRIPTION, 1, 50),
    To_char (TIMESTAMP, "MM/DD/YY hh12:mi:ss'") TIMES
    OF GLOBALSALES. CUBE_STATUS
    UNION ALL
    SELECT
    "BUILD TOTAL TIME."
    TO_CHAR (TO_DATE('00:00:00','HH24:MI:SS') + (MAX (TIMESTAMP) - MIN (TIMESTAMP)), 'HH24:MI:SS')
    OF GLOBALSALES. CUBE_STATUS);
    Scrr csrO % ROWTYPE;
    sT LONG: = ";
    sS LONG: = ";
    BEGIN
    FOR Scrr IN csrO
    LOOP
    sT: = crsR.STATUS;
    sS: = crsR.TIME;
    DBMS_OUTPUT. Put_line(St ||) ' ' || sS);
    END LOOP;
    END;
    /

    The results of changes in the same PLS-00201 error messages stating the: identifier ' CRSR. STATUS must be declared
    and the identifier ' CRSR. STATUS must be declared
    ...
    FOR Scrr IN csrO
    LOOP
    sT: = crsR.STATUS;
    sS: = crsR.TIME;
    DBMS_OUTPUT. Put_line(St ||) ' ' || sS);
    END LOOP;

    You are not running what I posted here.

    Please replace this line here:

    FOR csrR IN csrO 
    

    to do this:

    FOR crsR IN csrO 
    

    It helps if you name your variables and objects after something more meaningful and less complicated, for example:

    FOR cur_rec IN csrO
    LOOP
      sT := cur_rec.STATUS;
      sS := cur_rec.TIME;
      DBMS_OUTPUT.PUT_LINE(sT || ' ' || sS);
    END LOOP;
    

Maybe you are looking for

  • Play through Cup?

    I have this memory of being able to hit a shortcut key and the cursor will auto backspace just enough for me to be able to back up a certain distance and play through a cut.  It is so fast to check the cuts. Ring the bells out there? I did some resea

  • Satellite L40 - 17R - FN Volume Hotkey problem - Windows XP

    Hello I recently bought satellite L40 - 17R (PSL4CE) without a preinstalled OS. I installed Windows XP Home Edition SP2. Then I installed all the drivers, that I found for this model on the site of Toshiba driver. I've even updated BIOS.After this, a

  • Y at - it an iPad Pro app written with lines like paper?

    I like the iPad Pro writing ability, but y at - it a soft which made lines like a regular piece of paper that I can use to write with? I have Evernote, paper, etc and even if I can write, im a little OCD and want to write about the lines. Someone at

  • Digital Camera RAW Compatibility Update 6.18 came out

    Supported by Digital Camera RAW Compatibility Update 6.18 Canon EOS M10 Canon PowerShot G5 X Canon PowerShot G9 X Leica SL (Typ 601) Olympus OM - D E - M10 Mark II Sony Alpha ILÇE-7s II Sony Cyber-shot DSC-RX1R II RAW formats digital camera, supporte

  • c:\windows\system32\winspoolDRV\ is not designed to run on windows or it contains an error

    When I start my computer and enter my password, I get the following message. c:\windows\system32\winspoolDRV\ is not designed to run on windows or it contains an error. Then the following messages displays pop up. Advanced care system has ceased to f