How to call 2 refcursor returned by the same procedure

I have a PL/SQL Procedure that's returning 2 ref cursors.
How can I call these 2 ref cursors using OO4O Connection in MS Access.
For 1 refcursor I have the following code:
Set OraSqlStmt = OraDatabase.CreateSql("begin package_refcur.procedure(:OrdCursor);end;", ORASQL_FAILEXEC)
How do I call the 2nd Refcur which is returned by the same procedure?

If you want to populate the two ref cursors and return them to a calling program all you need to do is:
OPEN cur_var1 FOR
  SELECT *
     FROM tab1
      where rownum = 1;
OPEN cur_var2 FOR
  SELECT *
     FROM tab1
      where rownum = 2;Now both of the ref cursors are populated.
Here is an example
declare
  type obj_curtype is ref cursor
    return all_objects%rowtype;
  type view_curtype is ref cursor
    return all_views%rowtype;
  ref_all_obj    obj_curtype;
  ref_all_view   view_curtype;
  objrec         all_objects%rowtype;
  viewrec        all_views%rowtype;
begin
  open ref_all_obj for
    select *
    from   all_objects; --PLEASE NOTE NO FETCH INTO
  open ref_all_view for
    select *
    from   all_views; --PLEASE NOTE NO FETCH INTO
  /* The following is here to show you that there is data in the ref cursors
        You could loop through the whole ref cursor.
        In your case these ref cursors are being returned */          
  fetch  ref_all_view
  into   viewrec;
  dbms_output.put_line('view name = ' ||
                       viewrec.view_name);
  fetch  ref_all_obj
  into   objrec;
  dbms_output.put_line('Obj name = ' ||
                       objrec.object_name);
end;I hope I understood your question and this help.
Bob.

Similar Messages

  • How to call a new Form with the same menu-settings then the calling Form

    In Form A we enable/disable some menu-items a runtime.
    When calling Form B we want to use these menu-settings.
    With other words: we don't want to enable-disable this item at eachr Form startup, but once, when the app. is started.
    Somebody an idea ?

    yes.
    bye
    TPD

  • How can I return to the same position in the calling order details form

    I am Calling a form for creating a new item from order details form, so after creating The new item I want to returned the item code to the calling form to same position in The order details form , how can I return to the same position in the order details form
    Waiting for your valuable answer .
    Best regards
    Jamil Alshaibani

    Dear Friends
    My actual problem description as the following
    I have a form for production order screen , and this form contain header and details blocks , so the user in the details will select Type Code , and he will go the next field that is Item Code Field search for specific Item Code if it is not exist he has to call the Item Definition Form by using this script
    CALL_FORM(ITEM_DEFINITION);
    Then when he finished defining the Item , and I assign the item code as the following in the :
    WHEN-BUTTON-PRESSED TRIGGER
    :GLOBAL.ITEM_CODE_VAR := :ITEM_CODE;
    DO_KEY('exit_form');
    But I don't know where to keep this assignment
    :ITEM_CODE := :GLOBAL.ITEM_CODE_VAR;
    inside the caller form in which trigger do I have to use when it return from the caller form it should assign the :GLOBAL.ITEM_CODE_VAR to the :ITEM_CODE and the cursor it should show inside the ITEM_CODE , and as I mention it does not return to the same location of The ITEM_CODE when it return from the calling form
    Waiting for your valuable answer .
    With example please .
    Best Regards
    Jamil Alshaibani

  • When installing Maverick on my 17" Macbook pro I got the message that my HD is damaged and can't be repaired. I now can't restart without simply repeating the attempt to install Maverick and thereby returning to the same message. How do I abort install

    When installing Maverick on my 17" Macbook pro I got the message that my HD was damaged and couldn't be repaired. (not good news!!) I now can't restart without returning  to the Maverick setup and therefore returning to the same message. How do I abort the Maverick installation so that I can try to return to the previous OS so that I can try to recover/repair the HD

    I have the same problem with my 2008 MacBook. Repair disk from disk utility says it was successful but the installer thinks it's groundhog day after a reboot. I also tried fsck -fy after booting in to a command mode and it came back clean but again the installer gives the same error message. It seems like a bit is stuck somewhere indicating my HD is bad when it isn't.
    I had the latest version of Mountain Lion and have applied every upgrade up to then without issue.
    Anyone find a solution yet without having to erase the entire disk and staring over?
    Attached is a screen shot of the error.

  • How do I return to the same folder in Mavericks?

    Since I've upgraded to Mavericks, my apps always go back to the top level when I open a document. For example, let's say I want to open a document called SAMPLE FILE.  I go to the file menu, select OPEN and then navigate thru the directory to find the file I want...
    HD > Clients > Documents > SAMPLE FILE
    Now I want to open a second file - I go to the file menu, select OPEN and instead of returning to the "Documents" folder where my SAMPLE FILE was just found - it puts me back at the top of the directory...
    HD >
    ... and I have to dig thru all the folders again to return to where I just was.
    In my previous system configurations (going back as far as I remember) - the default was to return to the same folder. Or maybe I always set the preferences that way - I honestly don't remember. But now I've searched all over for it and can't find it. Anyone know where to find it? Or has it been eliminated in Mavericks? I can't imagine Apple would do that.
    Any and all help would be appreciated. Thanks.

    Dear Friends
    My actual problem description as the following
    I have a form for production order screen , and this form contain header and details blocks , so the user in the details will select Type Code , and he will go the next field that is Item Code Field search for specific Item Code if it is not exist he has to call the Item Definition Form by using this script
    CALL_FORM(ITEM_DEFINITION);
    Then when he finished defining the Item , and I assign the item code as the following in the :
    WHEN-BUTTON-PRESSED TRIGGER
    :GLOBAL.ITEM_CODE_VAR := :ITEM_CODE;
    DO_KEY('exit_form');
    But I don't know where to keep this assignment
    :ITEM_CODE := :GLOBAL.ITEM_CODE_VAR;
    inside the caller form in which trigger do I have to use when it return from the caller form it should assign the :GLOBAL.ITEM_CODE_VAR to the :ITEM_CODE and the cursor it should show inside the ITEM_CODE , and as I mention it does not return to the same location of The ITEM_CODE when it return from the calling form
    Waiting for your valuable answer .
    With example please .
    Best Regards
    Jamil Alshaibani

  • How to call html page with in the flash

    I am new to action script, can some one guide me how to call html page with in the flash. lets say i have movie clip having instance name as "news_feed", I need to disply the html page in this news_feed. kindly help me, thanks alot

    some one tell me, weather it is possible or not ??

  • How to call or open without specifying the full path?

    hi all,
    how to call or open without specifying the full path?
    for example the following code of a when_button_pressed trigger.
    call_form('c:\test\student.fmx',hide,do_replace);
    open_form('c:\test\student.fmx');
    i want to specify only the form name.
    call_form('student.fmx');
    open_form('student.fmx');
    i m using developer 2000.
    regard
    Muhammad Nadeem
    [email protected]

    HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\FORMS60_PATH=c:\test\;c:\orant\bin;...

  • How to run the same procedure in parallel for different parameter value.

    Hi There,
    I am currently working on extracting data in to flat file and I am able to do so for one revenue month (e.g. 200101) using PL/SQL procedure(get_rev_data). it takes almost 1 hour to execute the procedure completely and it generates 400 MB data file. Now I have to run this procedure for last 10 yrs of data (i.e. 120 revenue months) . my prolem here is to figure out a way/logic in such a way that I can run the procedure in parallel for each revenue month and at the same time it will write the data in respective data file for each revenue month. so the final result of this exercise would be 120 flat files, one for each revenue month with file names like
    EXTRACT_00001001 to EXTRACT_00001120.
    where
    first five digits : 00001 will indicate the Extract run number and
    last three digits : 001 will indicate the thread number for each run.
    I am thinking of doing this by creating a table "RevMonth" with two values (revenue_month, thread_num) and calling the procedure in a simple select statement and passing revenue_month as parameter of the procedure like
    SELECT get_rev_data(revenue_month, thread_num)
    FROM REVMONTH;
    But I am not sure if that will do the needful. Any idea on how to achieve this will be of great help. Thank you.

    Hi Smit,
    Thanks for the advise. I am not planning to run for all 120 months at once. actually I am planning to run like 1 year (12 revenue months at a time). I am not sure if that will work well but I was planning to run this through shell script (Unix) and will call the same procedure with different parameter (revenue_month and Thread_number) values and see what happens. I hope that will run in parallel for each revenue month.
    Let me know if you have more knowledge about it. THanks a lot.
    Thanks,
    .

  • Browser REFRESH button does not return to the same iView/Page

    Hi,
    In SDN site I have seen that in whichever menu i am in, if i use the browser refresh button i return to the same page. But this does not happen on my enterprise portal.
    Can you please let me know, how to set / configure the enterprise portal EP7 such that, if am in any iview and use the browser refresh, then i am returned to the same iview / page and not to the first page of the menu. Currently in my portal, when i hit the browser REFRESH button, it takes me to the first page/iview.
    Thanks,
    Anirban

    Dear Romano,
    Thanks for your reply. With the help of the document link that you have provided, i have been able to achieve my target partially. Currently i am able to refer to the iView and Role directly using the QuickLink and when i access that particular iView & Role using the QuickLink and then do a refresh, the same screen appears. This part is working fine. But i have one issue.
    But generally a iView/Role is accessed not via the QuickLink on the browser but by clicking on the Role on Navigation Level 1. Even though this Role has a QuickLink, it is not visible in the address bar since the QuickLink URL was not used for reaching the Role. In such a situation, when we press the REFRESH button, the iView / Role is vanished and the browser returns to the first default page of the portal.
    Can we somehow make it such that whenever the Role is accessed in the Navigation Levels, it can be accessed via QuickLinks and the QuickLink URL is displayed on the address bar ? If this can be achieved, then i guess the problem will be solved.
    I hope i have been able to get across my point. Hoping to hear a positive reply from your side.
    Thanks in advance.
    Regards,
    Anirban Kundu.

  • Using 2 refcursors within the same procedure

    Hi,
    Can we use 2 refcursors within the same procedure. This might sound strange. But I have a scenario of doing so- one for dynamically checking for some validations and another for returning a result set.

    Yes, go thru the below example.
    CREATE OR REPLACE PACKAGE CURSPKG AS
    TYPE T_CURSOR IS REF CURSOR;
    PROCEDURE OPEN_TWO_CURSORS (EMPCURSOR OUT T_CURSOR,
    DEPTCURSOR OUT T_CURSOR);
    END CURSPKG;
    CREATE OR REPLACE PACKAGE BODY CURSPKG AS
    PROCEDURE OPEN_TWO_CURSORS (EMPCURSOR OUT T_CURSOR,
    DEPTCURSOR OUT T_CURSOR)
    IS
    V_CURSOR1 T_CURSOR;
    V_CURSOR2 T_CURSOR;
    BEGIN
    OPEN V_CURSOR1 FOR SELECT * FROM EMP;
    OPEN V_CURSOR2 FOR SELECT * FROM DEPT;
    EMPCURSOR := V_CURSOR1;
    DEPTCURSOR := V_CURSOR2;
    END OPEN_TWO_CURSORS;
    END CURSPKG;
    I hope it would be helpful.

  • How can 2 people use itunes in the same household? we both have iphone 4 and separate id but the same itunes? pleasehelp

           how can two people use itunes in the same household? i had a iphone before so alreday had an itunes account now me and my husband have upgraded and we now both have them. he has set up a username and i have mine yet when he logs in he seems to just get my account? please help

    Decide which iPhone will be keeping the current iCloud account.  On the one that will be changing accounts, if you have any photos in photo stream that are not in your camera roll or backed up somewhere else save these to your camera roll by opening the photo stream album in the thumbnail view, tapping Edit, then tap all the photos you want to save, tap Share and tap Save to Camera Roll.  If you are syncing Notes with iCloud, you'll also have to email your notes to yourself so they can be recreated in the new account as they cannot be migrated.
    Once this is done, go to Settings>iCloud, scroll to the bottom and tap Delete Account.  (This will only delete the account from this phone, not from iCloud.  The phone that will be keeping the account will not be effected by this.)  When prompted about what to do with the iCloud data, be sure to select Keep On My iPhone.  Next, set up a new iCloud account using a different Apple ID (if you don't have one, tap Get a Free Apple ID at the bottom).  Then turn iCloud data syncing for contacts, etc. back to On, and when prompted about merging with iCloud, choose Merge.  This will upload the data to the new account.
    Finally, to un-merge the data you will then have to go to icloud.com on your computer and sign into each iCloud account separately and manually delete the data you don't want (such as deleting your wife's data from your account, and vice versa).

  • How can I save multiple titles under the same DVD?

    I use HandBrake to rip DVD's into iTunes. How can I save multiple titles under the same DVD? For instance, I have a Jimi Hendrix documentary that comes with special features, such as concert performances. I would like to have the main feature and the special features saved in my iTunes under the same title, perhaps as different 'tracks' (kind of like how different songs can be saved under the same album).
    Is there a way for me to do this, or am I chasing phantoms?

    *This response is for iPhoto 11 (v9). If you're using an earlier version, please post back and let us know. Troubleshooting steps are not the same for different versions. To find out which iPhoto you have: iPhoto Menu -> About iPhoto)*
    Duplicate the photo first. (Photos -> Duplicate). This means that you will have multiple copies of the master as well as the edited version.
    If you use versions like this often and wish to have only one master then you can do this with Aperture.
    Regards
    TD

  • When importing songs of a same album but different artist iTunes will separate the artists. How can I bring all together in the same album?

    When importing songs of a same album but different artist iTunes will separate the artists. How can I bring all together in the same album?

    Generally setting a common Album Artist will fix things. For deeper problems see Grouping tracks into albums.
    tt2

  • I am changing from Word to Pages. I have created my custom template with all my styles etc and that is what comes up when I go for a New Document. Fine. How do I get it to use the same Custom Template when I use Pages to open a Word document?

    I am changing from Word to Pages. I have created my custom template with all my styles etc and that is what comes up when I go for a New Document. Fine. How do I get it to use the same Custom Template when I use Pages to open a Word document?

    The template is a document in itself, it is not applied to an existing document whether it is a Pages document or a Word document converted to a Pages document.
    You would need to either copy and paste content, using existing styles, or apply the styles to the converted Word document.
    You can Import the Styles from an existing document and those imported Styles can be used to override the current document's styles:
    Menu > Format > Import Styles
    The process is simplified if the styles use the same names, otherwise you will need to delete the style you don't want and replace it with the one that you do want when asked, then the substitution is pretty straightforward.
    Peter

  • How to call statement's execute function to execute procedure in Oracle?

    I made a very simple procedure in oracle logged as internal user.
    the procedure as the following:
    create or replace procedure temptest
    as
    begin
    insert into indextab(idx) values(100);
    commit;
    end temptest;
    in Java program,I use Oracle's jdbc driver to connect database, still connect as internal user.
    I can call statement.executeUpdate("insert into indextab(idx) values(100)"). and 100 row was added in database.
    then,I delete this row, try to run procedure in java,
    but the call of statement.execute("temptest") throw a exception
    the error message is:"java.sql.SQLException: ORA-00900: invalid SQL statement"
    then, I write the same procedure in sql server.
    all things work right.( I use jdbc-odbc bridge connect to sql server database)
    who can tell me what's the reason?
    I'm so urgent, please help me as soon as fast, thank you very much

    Instead of a Statement object, use a CallableStatement. CallableStatement is the JDBC wrapper for a stored proc. JDBC requires that the vendor specific call be wrapped in a {CALL ....}.
    So, your code would look like the following:
    Connection con = some connection;
    CallableStatement cs = con.prepareCall("{CALL temptest}");
    cs.execute();
    Take a look at the Javadoc. You can set both IN and OUT parameters using a CallableStatement.

Maybe you are looking for

  • Calling functions and inserting tables based on values entered

    Hello Everyone, I am creating a function as below: create or replace function func(flags in number,Ctry in varchar2) return number is maxv number; flagv number; begin flagv:=1; select max(num) into maxv from A; if flags =1 then insert into A(num,nam)

  • EJB 3, OneToMany that Acts As Tree, or Parent Child relationship support?

    (Sorry for the RoR reference) I first searched the forum and found this post that came close, but not exactly what I'm needing since my table doesn't reference the PK: http://forum.java.sun.com/thread.jspa?forumID=13&threadID=767913 I have a table ca

  • PC Quicken data to MacBook Air? (and Photoshop...)

    A long time PC friend is dreading switch to Air due to much old Quicken (and Photoshop) data. Is it possible to import PC Quicken data onto a MB Air using the Mac version of Quicken? If so, does anyone have links to a 'help' resource for this purpose

  • BitmapData Resize and rotation

    Hi there, I'm having some problems manipulating an image with AS3 and Flash Player 10. I've managed to edit a Bitmap from a local image by changing it's size and rotation with the help of class Matrix. The problem is that now I want to save the new i

  • I want to pursue SAP Career. Please Guide.

    Hi, I am looking to shift from Small level ERP to SAP with following experience: 1. M.COM 2. 8+ Years in Develoment experience in Clipper, VB, SQL. 3. 4+ Domain knowledge of Lean Manufacturing, Finance, Sales & Distribution. These experience in Roles