Datablock in forms 6 based on a stored procedure
Date: 30 May 2002 13:04:13 -0700
Message-ID: <46b4cd8d.0205301204.1ccf1fc8_at_posting.google.com>
[Quoted] Hi, I'm finaly close to achieving the goal to link a datablock to a stored procedure.
The datablock contains 3 text item lists which correspond to the result of a query which is returned to the block by the stored procedure in form of a ref cursor.
The procedure is correct and is correctly retrieving the results. The problem which is left is the error message "FRM-40831: Truncation occurred: value too long for field clientname."
I'm sure all fields in the datablock are at a correct maximum size
(>200), and should be able to display the results! Maybe there not
correctly linked I guess, but I couldn't imagine how to achieve this.
Another guess: The ref cursor is an IN OUT variable, which I call with no parameter when the procedure is called. Maybe it should have a paramter, but I don't know which.
Thank you for any hints,
Heiko Kopitzki
*******CODE FOR THE PROCEDURE******
CREATE OR REPLACE PACKAGE ref_cursor_package AS
TYPE return_type IS RECORD (
clientid NUMBER(6),
clientname VARCHAR2(45),
clientaddress VARCHAR2(40)
);
Type sys_refcursor is Ref Cursor RETURN return_type;
PROCEDURE tesfun( prodid_in IN INTEGER, v_cur IN OUT sys_refcursor
);
END ref_cursor_package;
/
show errors
CREATE OR REPLACE PACKAGE BODY ref_cursor_package AS
PROCEDURE tesfun( prodid_in IN INTEGER, v_cur IN OUT sys_refcursor )
IS
begin
open v_cur for
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_in;
end tesfun;
END ref_cursor_package;
/
show errors
Received on Thu May 30 2002 - 22:04:13 CEST