JavaRanch » Java Forums »
Databases »
JDBC
| Author |
The INSERT INTO statement contains the following unknown field name: 'OPANo'.
|
Akriti Bahal
Greenhorn
Joined: Jul 20, 2011
Posts: 4
|
|
I have the following code which compiles fine but when it runs then it throws the exception that java.sql.SQLException:[Microsoft][ODBC Microsoft Access Driver] The INSERT INTO statement contains the following unknown field name: 'OPANo'. Make sure you have typed the name correctly, and try the operation again., please if you could help what is wrong it would be a great help.
|
 |
joy b chakravarty
Ranch Hand
Joined: May 16, 2011
Posts: 62
|
|
|
a stacktrace would help
|
Cheers, Joy [SCJP 1.4, SCBCD 5.0]
get high on alcohol, algorithm or both
|
 |
joy b chakravarty
Ranch Hand
Joined: May 16, 2011
Posts: 62
|
|
VALUES(?,?,?,?,?,?,?,?,?,?,?)");
A ? is missing ... just check
|
 |
Akriti Bahal
Greenhorn
Joined: Jul 20, 2011
Posts: 4
|
|
|
Ya, one ? was missing and I put it now but, now I'm getting "java.sql.SQLException:[Microsoft][ODBC Microsoft Access Driver] The INSERT INTO statement contains the following unknown field name: 'OPANo'. Make sure you have typed the name correctly, and try the operation again." exception when I run it. Please help.
|
 |
Akriti Bahal
Greenhorn
Joined: Jul 20, 2011
Posts: 4
|
|
What's a stcktrace?
|
 |
Ashwin Sridhar
Ranch Hand
Joined: Jul 09, 2011
Posts: 272
|
|
|
are you sure if there is a column by name OPANo in the 'project' table
|
Ashwin Sridhar
SCJP | SCWCD | OCA
|
 |
 |
|
|
subject: The INSERT INTO statement contains the following unknown field name: 'OPANo'.
|
|
|
|