File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes ODBC - too few parameters ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "ODBC - too few parameters ??" Watch "ODBC - too few parameters ??" New topic

ODBC - too few parameters ??

Julie de Wet

Joined: Apr 04, 2004
Posts: 17
This is probably a trivial problem - but I'm stuck
SELECT MA-nr, Fornavn FROM Medarbejder WHERE MA-nr = '0200695';
I make a PreparedStatement with the above sql, when I call executeQuery I get the following exception:
java.sql.SQLException: [Microsoft][ODBC Microsoft Access-driver] Der er for f� parametre. Der var ventet 2
i.e. too few parameters - 2 were expected.
What could be possible/probable causes ?
Julie de Wet

Joined: Apr 04, 2004
Posts: 17
It was trivial. It was the hyphon.
I agree. Here's the link:
subject: ODBC - too few parameters ??
It's not a secret anymore!