Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Ref cursor from stored procedure for use in Forms 6
Hi, I'm trying desperately to register a function on the server which
will return a ref cursor for use in a data block in Forms.
Can someone find the error in the code at the end of the posting and do you know how to use the ref cursor in the datablock (by a trigger or simply by a property?)
Thanks a lot!!!
Heiko Kopitzki
******CODE******
CREATE FUNCTION ts( prodid_para IN INT ) RETURN REF CURSOR
IS
TYPE result_type IS RECORD (
clientId NUMBER(4),
clientName VARCHAR2,
clientAdresse VARCHAR2
);
TYPE result_cursor_type IS REF CURSOR RETURN result_type; rc result_cursor; -- declare cursor variable
rc IS
SELECT client.custid, client.name, client.address FROM client,
produit, ligne_comm, commande
WHERE client.custid = commande.custid AND commande.ordid = ligne_comm.ordid AND produit.prodid = prodid_para;
BEGIN
RETURN rc;
END;
/
show errors
Received on Tue May 28 2002 - 13:21:34 CDT