This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes java.sql.SQLException: Missing IN or OUT parameter at index:: 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 "java.sql.SQLException: Missing IN or OUT parameter at index::" Watch "java.sql.SQLException: Missing IN or OUT parameter at index::" New topic
Author

java.sql.SQLException: Missing IN or OUT parameter at index::

Sri Ram
Ranch Hand

Joined: Oct 03, 2005
Posts: 118
Hi ranchers,

I have a prepared statement, which is fired in loop for some 15 records. But for some recs it updates properly, and others it fails, giving me this above exception.

but the second time the loop runs, the data base is getting updated properly. I tried in google and in this bar also. But failed to get the proper explanation for this. Please help me guys.
Sivaraman Lakshmanan
Ranch Hand

Joined: Aug 02, 2003
Posts: 231
Hi,

Before executing the query print them out and try them running seperately in database and see if you are missing any of the inputs. Did you check the 54th index on the failing query to find anything missing?


Regards,
Sivaraman.L
Sri Ram
Ranch Hand

Joined: Oct 03, 2005
Posts: 118
Hi,

If i try with one record, it goes thro properly. I mean no exceptions at all.

This exception is coming only few times, if i update some 20 records, i get this for some 5 or 6 records only. Sometimes no exceptions are coming.
Abhi Vuyyuru
Greenhorn

Joined: Mar 10, 2005
Posts: 12
Can you post the code for the loop.


Abhi Vuyyuru
Blog: http://java-x.blogspot.com
 
Don't get me started about those stupid light bulbs.
 
subject: java.sql.SQLException: Missing IN or OUT parameter at index::
 
Similar Threads
Determine the Callable Statements Parameters at runtime
JDBC/insert
Retreving PDF File from Database using Java
Can I call CallableStatement .getObject(int)
firewall and db connection pool