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 Error Code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Error Code " Watch "Error Code " New topic

Error Code

Phaneendra Gugggilam

Joined: Sep 23, 2008
Posts: 14
DB2 SQL error: SQLCODE: -313, SQLSTATE: 07001, SQLERRMC: null
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 45346
Look on the DB2 website for what the error codes mean.
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

By coincidence, I'm already on the DB2 website so I can save you some time. It means:

"The number of host variables is not correct for the number of parameter markers."

So it sounds like you have more/less parameters in your query than you have bound.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
It is sorta covered in the JavaRanch Style Guide.
subject: Error Code
It's not a secret anymore!