On Jul 27, 12:21 am, garling...@tiscali.co.uk wrote:
> > I'm getting this error doing an SQL insert:
>
[quoted text clipped - 8 lines]
>
> What does your insert statement look like? The actual code will help.
This is how I make the statement in Java:
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 (?,?,?,?,?,?,?,?,?,?"+
" ?,?,?,?,?,?,?)");
Doing the same insert in sqlplus using 'test' for all the varchars and
a dummy numbers and dates for all the other fields works fine.
I'm wondering if it's something to do with the JDBC driver, thou I've
checked and I definitely have the right versus for my version of
Oracle.
Lee Fesperman - 28 Jul 2007 21:38 GMT
> On Jul 27, 12:21 am, garling...@tiscali.co.uk wrote:
> >
[quoted text clipped - 11 lines]
> " VALUES (?,?,?,?,?,?,?,?,?,?"+
> " ?,?,?,?,?,?,?)");
You're missing a comma (,) between the 10th and 11th question mark (?)
in the VALUES list.
--
Lee Fesperman, FFE Software, Inc. (http://www.firstsql.com)
==============================================================
* The Ultimate DBMS is here!
* FirstSQL/J Object/Relational DBMS (http://www.firstsql.com)