Re: ORA-06502 error when returning varchar2...

From: DA Morgan <damorgan_at_psoug.org>
Date: Sat, 08 Mar 2008 17:25:59 -0800
Message-ID: <1205025953.866123@bubbleator.drizzle.com>


buu wrote:
> I have an procedure with an query like:
>
>
> function aa() return varchar2 as
>
> begin
> update table1
> set field_1='xxx'
> where id=1
> returning field_2 into v_retval:
>
> return v_retval;
> end;
>
> I'm handling that simple function in vb.net 2005.
> But, in vb.net I receive an ORA 6502 error.. why? fileld size is not a
> problem.

I've read all of the replies so far and trying to get help when you do not include the real code, do not include the real error message, and do not include the version number is pretty bad. But one problem that jumps out here is that v_retval is undeclared. I am amazed this compiles at all.

-- 
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan_at_x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Sat Mar 08 2008 - 19:25:59 CST

Original text of this message