REF CURSOR ISSUE [message #389940] |
Wed, 04 March 2009 04:20  |
nmascrene
Messages: 5 Registered: February 2009 Location: Mumbai
|
Junior Member |

|
|
Hi
I want to make use of ref cursor in my forms(client)
I have created a db function which is of (refcursor/sys_refcursor) return type.
CREATE OR REPLACE FUNCTION f
RETURN SYS_REFCURSOR
AS
c SYS_REFCURSOR;
BEGIN
OPEN c FOR select * from dual;
RETURN c;
END;
-----
calling environment
DECLARE
c SYS_REFCURSOR;
v VARCHAR2(1);
BEGIN
c := f(); -- Get ref cursor from function
FETCH c into v;
dbms_output.put_line('Value from cursor: '||v);
END;
when I call this function from forms , the cursor is invalid whereas i tested the same code in sql*plus , data is displayed .
Is it possible to use a ref cursor created in a db function to be
used at client(form) end?
|
|
|
|