Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: JDBC on JRun & Orace 9i causes "bind variable does not exist"
sam wrote:
> Hi!
> ------------------------------------------------------------
> java.sql.SQLException: ORA-01006: bind variable does not exist
> ------------------------------------------------------------
>
> This is the msg I get when I try to insert into a database. I want to
> insert a very large value (>4k) into the database using an UPDATE or
> INSERT query and got a "string literal too long" error so decided to
> use bind variables.
>
> The code is as follows: It breaks up the larger value for the column
> into smaller pieces and attempts to update it. Am I doing something
> wrong here? Can someone plz tell me how to do it? Thanx a lot
> !!!!!!!!!!!!!!!!!!!
It likely has nothing to do with your code and everything to do with your table. If the text column is VARCHAR then there is the 4K limit. So the original error message is the thing to fix (not work around).
So for the "string literal too long" error either
You can change your code to never try to insert >4K strings.
or
in case 1 change the table column to accept larger strings (change type from
VARCHAR to CLOB)
or
in case 2 change the code to send the text in smaller chunks and append to the
data that's there.
I think that covers the possibilities.
-- Edward J. Prochak --- Magic Interface, Ltd. Ofc: 440-498-3700 --- 7295 Popham Place, Solon, OH 44139 on the web at --- http://www.magicinterface.com email: ed.prochak_at_magicinterface.comReceived on Sun Apr 13 2003 - 02:11:31 CDT