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 -> Re: Allocate memory for IN OUT varchar2 parameter in PL/SQL

Re: Allocate memory for IN OUT varchar2 parameter in PL/SQL

From: <mark_fredericks_at_my-dejanews.com>
Date: Thu, 15 Apr 1999 18:47:48 GMT
Message-ID: <7f5c8h$3o$1@nnrp1.dejanews.com>


If you are calling a procedure with an in out paramenter using a constant in the call -then there is no variable to recive the return value. Call the procedure with a variable that is sized the same as the parameter.

declare

   v_temp varchar2(9) := 'abc';
begin

   pr_get_something (io_paramer1 => v_temp); end;

HTH Mark

In article <7f2tv4$t7i$1_at_nnrp1.dejanews.com>,   fchen_at_aisystem.com wrote:
> Does anyone know how to allocate the memeory for a IN OUT varchar2 parameter
> on fly?
>
> Here is my PL/SQL procedure:
>
> CREATE OR REPLACE PROCEDURE pr_get_something (io_paramer1 IN OUT VARCHAR2)
> IS
> v_var1 VARCHAR2(9);
> BEGIN
> v_var1 := '123456789';
> io_paramer1 := v_var1;
> END pr_get_something;
>
> From calling program, I passed in a string "adb" as io_paramer1 to
> pr_get_something()
>
> The problem is: ORA-6502: numeric or value error.
>
> I know the problem is that io_parameter has 3 characters length space, and it
> cannot accept 9 characters length value. I do not want the calling routine to
> handle the allocation.

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Thu Apr 15 1999 - 13:47:48 CDT

Original text of this message

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