| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle JDBC error - SOLVED!
On Jul 26, 4:39 pm, Peter Ashford <peter.m.ashf..._at_gmail.com> wrote:
> I'm getting this error doing an SQL insert:
>
> java.sql.SQLException: ORA-01745: invalid host/bind variable name
>
> I know there's no invalid names in the insert because I can insert
> data into the table by hand over sqlplus.
>
> I'm using oracle's ojbdc14 jdbc driver and Java 1.6.
>
> Any ideas?
I got it!
PreparedStatement pStmt = db.prepareStatement(
"INSERT INTO departments ("+
" deptName, schoolName, division, dean, AVC, HOD,
admin, adminPhone, adminEmail," +
" streetAddress, city, cbCostCentre,
cbOHAccountCode, cbOHDisection, comments, " +
" schoolLiasonAdmin, dateEntered)" +
" VALUES (?,?,?,?,?,?,?,?,?,?"+
" ?,?,?,?,?,?,?)");
There's a missing comma between the lines of ?'s.
I am SUCH an idiot. :o)
Thanks everyone who offered help and ideas - especially Joe and Steve!
Peter. Received on Thu Jul 26 2007 - 22:05:28 CDT
![]() |
![]() |