Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> working with PL/SQL REF CURSORs
I need some help working with PL/SQL REF CURSORS.
I understand how they are used to pass a recordset back to ADO from an ASP page. What I would like to do is call the same procedure (that is returning the REF CURSOR as an IN OUT parameter) from another PL/SQL procedure in the same schema and get at the data in the REF CURSOR. This way I can use the same proc for the ADO call from ASP, as well as another PL/SQL procedure to get at the same data.
Here's what I have:
Proc that returns the REF CURSOR:
dtStartDate IN DATE, dtEndDate IN DATE, io_cursor IN OUT t_cursor
OPEN v_cursor FOR SELECT s.COL1, s.COL2, s.COL3 FROM SOMETABLE s WHERE s.THEDATE BETWEEN dtStartDate AND dtEndDate io_cursor := v_cursor;
END P_RPT_SOMEDATA;
...
Proc that calls the above proc:
END; I am unclear about the syntax, please help. Thank you. Received on Mon Oct 28 2002 - 12:48:53 CST