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

Allocate memory for IN OUT varchar2 parameter in PL/SQL

From: <fchen_at_aisystem.com>
Date: Wed, 14 Apr 1999 20:31:32 GMT
Message-ID: <7f2tv4$t7i$1@nnrp1.dejanews.com>


Hi,

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.

Thanks for any help,

Fei

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Wed Apr 14 1999 - 15:31:32 CDT

Original text of this message

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