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 -> JDBC on JRun & Orace 9i causes "bind variable does not exist"

JDBC on JRun & Orace 9i causes "bind variable does not exist"

From: sam <jonny_piama_at_yahoo.com>
Date: 12 Apr 2003 04:27:12 -0700
Message-ID: <1ae42dc4.0304120327.1919bc31@posting.google.com>


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

!!!!!!!!!!!!!!!!!!!


------------------------------------------------------------
PreparedStatement StatementGeneric =
ConniServ.prepareStatement("INSERT INTO MYADMIN.MYTABLE (DEVICE_ID, SCHEDULES) values("+strDevice_ID+", ?)");

int i=0;
for(i=0;i<(factor);i++)
{
 strNewString1 = strNewString1.concat(valueForColumnSCHEDULES.substring((i*15), ((i*15)+15)));

 StatementGeneric.setString((i+1),
valueForColumnSCHEDULES.substring((i*15), ((i*15)+15))); }

StatementGeneric.setString((i+1),
valueForColumnSCHEDULES.substring((i*15), valueForColumnSCHEDULES.length()));

StatementGeneric.executeUpdate(); Received on Sat Apr 12 2003 - 06:27:12 CDT

Original text of this message

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