Executing a procedure which has a cursor as an 'OUT' parameter [message #249107] |
Tue, 03 July 2007 07:15 |
hannah.kamali
Messages: 10 Registered: July 2007 Location: Banglaore
|
Junior Member |
|
|
Hi All,
I am trying to call a certain procedure which has a cursor as an 'OUT' parameter in the following manner:
DECLARE
FLID NUMBER;
SEARCH_RESULTS REF CURSOR;
ERR_CODE NUMBER;
ERR_MSG VARCHAR2(200);
BEGIN
FLID := NULL;
ERR_CODE := NULL;
ERR_MSG := NULL;
PACKAGE_NAME.PROCEDURE_NAME( FLID,
SEARCH_RESULTS, ERR_CODE, ERR_MSG );
COMMIT;
END;
But I get the error message as "PLS-00201: identifier 'CURSOR' must be declared". But it is clearly evident that I am defining the cursor here.
I am pretty new to PL/SQL, so senior folks, please help!
|
|
|
|
|
|
Re: Executing a procedure which has a cursor as an 'OUT' parameter [message #249130 is a reply to message #249107] |
Tue, 03 July 2007 08:00 |
hannah.kamali
Messages: 10 Registered: July 2007 Location: Banglaore
|
Junior Member |
|
|
Hey all,
I've found a solution for this and it works! You can find it below,
DECLARE
FLID NUMBER;
TYPE R_CUR IS REF CURSOR;
SEARCH_RESULTS R_CUR;
ERR_CODE NUMBER;
ERR_MSG VARCHAR2(200);
BEGIN
FLID := NULL;
ERR_CODE := NULL;
ERR_MSG := NULL;
PACKAGE_NAME.PROCEDURE_NAME(FLID, SEARCH_RESULTS, ERR_CODE, ERR_MSG );
COMMIT;
END;
But I'm not sure if this an optimal solution..or there is some other solution for the same..
Please comment..
Frank & Maaher, thanks for your valuable suggestions..
|
|
|
|
|