Re: Datablock in forms 6 based on a stored procedure

From: Niall Litchfield <niall.litchfield_at_dial.pipex.com>
Date: Thu, 30 May 2002 22:12:56 +0100
Message-ID: <3cf695db$0$8513$cc9e4d1f_at_news.dial.pipex.com>


how long is the name field in the client table?

--
Niall Litchfield
Oracle DBA
Audit Commission UK
"Heiko" <heiko77_at_gmx.de> wrote in message
news:46b4cd8d.0205301204.1ccf1fc8_at_posting.google.com...

> 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 - 23:12:56 CEST

Original text of this message