> I am using oracle database and I have column of long data 
> type. I insert the
> data into this column thru perl script. If the inserted data 
> exceeds 4000
> chars, it is giving me the following error.
> 
> DBD::Oracle::st execute failed: ORA-01704: string literal too 
> long (DBD
> ERROR: OCIStmtExecute) at MT/TACDbManager.pm line 445.
> 
> Whereas we can insert upto 2GB of data in long data type.

 You've not posted any code, but if it's saying "string literal too long"
then the first thing to ask is whether you're using placeholders. If you're
embedding values in the SQL statement itself, then stop doing that, and
start using placeholders (aka bind variables).

 Like it says in the manual:

ORA-01704: string literal too long
    Cause: The string literal is longer than 4000 characters.
    Action: Use a string literal of at most 4000 characters. Longer values
may only be entered using bind variables.

-- 
Andy Hassall <[EMAIL PROTECTED]> / Space: disk usage analysis tool
<http://www.andyh.co.uk> / <http://www.andyhsoftware.co.uk/space> 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to