Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Sri Ram
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Sri Ram
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post the code for the loop.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic