Re: VARCHAR2 Parameter Question

From: Tim X <>
Date: Sat, 27 Sep 2008 16:28:00 +1000
Message-ID: <> writes:

> Hi,
> Does a VARCHAR2 input parameter to a stored procedure have a max
> length? I pass a 465 byte string to a procedure receiving it as a
> varchar2 and it gives some error of the string byte too small or
> something.
> I cut it down to 195 and it works fine. I bring it up in TOAD to
> debug it and the parameter shows a value of 200.
> Why is that? I thought the max value was 4000.

How long is a piece of string?

I think the max value of 4000 is for database columns. Its more like 32k in pl/sql (but note that this may not equal 32k characters, but bytes - all depends on the character set you are using). though I always forget this stuff, check the manual.

You have provided nowhere enough information. At the very least, you should provide the exact error message and oracle version.

At a guess, assuming the error message is being generated by the call and not in actual fact being generated within the procedure when it attempts to assign the parameter to a local variable that has a set size, it could be that the procedure has been defined with %TYPE or %ROWTYPE etc. However, without either the error code or the source code, its just a guess and my crystal ball is out of batteries just now, so I don't know.


tcross (at) rapttech dot com dot au
Received on Sat Sep 27 2008 - 01:28:00 CDT

Original text of this message