Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters.

 
Vishnu Munnangi
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I am executing the following Program.



The Tabel Name, Column name all are correct. But I am getting the following error message

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

Any help would be appreciated.

Thanks!

[edited to add code tags and disable smilies]
[ November 26, 2004: Message edited by: Jeanne Boyarsky ]
 
Gaurav Chikara
Ranch Hand
Posts: 412
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are not giving user id and password for the dsn you created for ODBC driver
and using DriverManager.getConnection is not at all recommeneded as it syncrhronizes access to class and you only have one thread of connection
Better avoid it
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic