wood burning stoves 2.0*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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
 
Similar Threads
Retrieve Number of Rows Affected in Calling Stored Procedure
Call PLSQL procedure from Java, parameter error
Oracle wrong number or types of arguments...
How can we call a stored procedure from java file
Retrieiving OUT parameters & return value from a Sybase Stored Procedure