Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Ref cursor from stored procedure for use in Forms 6

Ref cursor from stored procedure for use in Forms 6

From: Heiko <heiko77_at_gmx.de>
Date: 28 May 2002 11:21:34 -0700
Message-ID: <46b4cd8d.0205281021.64793b7e@posting.google.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US