Home » Developer & Programmer » Forms » REF CURSOR ISSUE (oracle 10 g )
REF CURSOR ISSUE [message #389940] Wed, 04 March 2009 04:20 Go to next message
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?


Re: REF CURSOR ISSUE [message #390089 is a reply to message #389940] Wed, 04 March 2009 22:20 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Search this forum for 'refcursor'.

David
Previous Topic: java bean triggers
Next Topic: Forms 6i doesn't save images in blob fields using Oracle 9iDB
Goto Forum:
  


Current Time: Thu Dec 08 08:32:31 CST 2016

Total time taken to generate the page: 0.06868 seconds