I've 3 procedures. proc3 calls proc2 calls proc1
proc3 passes a sys_refcursor as an out parameter to proc2
proc2 passes that to proc1
proc1 opens the cursor with a select
proc3 simply closes the out cursor
i am getting "ORA-01001: invalid cursor" while closing the cursor.
any idea?


-- PROC1
CREATE OR REPLACE
PROCEDURE TEST_PROC1
(
oCur OUT SYS_REFCURSOR
) AS
BEGIN
OPEN oCur FOR SELECT entity_id FROM entity;
END TEST_PROC1;

-- PROC2
CREATE OR REPLACE
PROCEDURE TEST_PROC2
(
oCur OUT SYS_REFCURSOR
) AS
BEGIN
test_proc1(oCur);
END TEST_PROC2;

-- PROC3
CREATE OR REPLACE
PROCEDURE TEST_PROC3 AS
oCur SYS_REFCURSOR;
BEGIN
test_proc2(oCur);
CLOSE oCur; -- Invalid cursor error here
END TEST_PROC3;


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to