aspose file tools*
The moose likes JDBC and the fly likes java.sql.SQLException: [Micorsoft][ODBC Microsoft Access Driver] Too few parameters. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "java.sql.SQLException: [Micorsoft][ODBC Microsoft Access Driver] Too few parameters. " Watch "java.sql.SQLException: [Micorsoft][ODBC Microsoft Access Driver] Too few parameters. " New topic
Author

java.sql.SQLException: [Micorsoft][ODBC Microsoft Access Driver] Too few parameters.

Bradley Wong
Greenhorn

Joined: Aug 10, 2001
Posts: 16
help!
i am trying to insert a record into access and i get the exception :
java.sql.SQLException: [Micorsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
i have checked the access field names, and types, and everything looks ok (spent about 6 hours checking everything!!!) the funy thing is that the program works when i update the access fields with numbers. but as soon as i put strings, i get the message above. but again, like i said, access and the insert query look like they are set up properly to accept the parameters from the query and update the db. any ideas anyone? i even tried to use a preparedStetment to get around it, but i get an error saying type mismatch. but cannot find a type problem anywhere.
thanks!!!
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Looks like you're going to have to paste some sample code for us then...
Dave
namita pa
Ranch Hand

Joined: Sep 06, 2001
Posts: 56
ya please send the query then we can try to solve the problem.....but anyway i'll try to mention here that you yourself please check that whether you are updating the record in the same order as the column in the tables.
------------------
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: java.sql.SQLException: [Micorsoft][ODBC Microsoft Access Driver] Too few parameters.