aspose file tools*
The moose likes JDBC and the fly likes stored procedure: Parameter index out of range Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "stored procedure: Parameter index out of range" Watch "stored procedure: Parameter index out of range" New topic
Author

stored procedure: Parameter index out of range

Edward Chen
Ranch Hand

Joined: Dec 23, 2003
Posts: 798
I call stored proc, but I got a parameter index error. Anybody has some ideas ?

Thanks.

stored procedure is:


Why I got error message "Caused by: java.sql.SQLException: JZ0SB: Parameter index out of range: 1."

Sybase says that
//////////
Parameter index out of range: _____.

Description: You have attempted to get, set, or register a parameter that goes beyond the maximum number of parameters.
Action: Check the number of parameters in your query.
///////////////

But you see, my parameters are right. Why?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: stored procedure: Parameter index out of range