REF CURSOR parameter [message #369688] |
Tue, 15 August 2000 21:23  |
S Kaza
Messages: 2 Registered: August 2000
|
Junior Member |
|
|
Can a REF CURSOR be just OUT parameter (instead of IN OUT) ?.
When I try to create a SP which has REF CURSOR parameter as OUT, I'm getting the following error.
PLS-00361:A cursor variable must be IN OUT to be OPENed.
Example:
PROCEDURE GetEmpRecords(indeptno IN NUMBER,
p_errorcode OUT NUMBER,
p_cursor OUT empcur)
IS
BEGIN
p_errorcode := 0;
OPEN p_cursor FOR SELECT * FROM emp WHERE deptno = indeptno ORDER BY ename;
EXCEPTION
WHEN OTHERS THEN
p_errorcode := SQLCODE;
END GetEmpRecords;
|
|
|
|
Re: REF CURSOR parameter [message #369691 is a reply to message #369688] |
Wed, 16 August 2000 08:02   |
S Kaza
Messages: 2 Registered: August 2000
|
Junior Member |
|
|
My question is, is it possible to declare REF CURSOR param as OUT (not IN OUT) and open it in the code, whithout getting any errors.
thanks in advance
|
|
|
|