• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

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

 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you post the code for the loop.
reply
    Bookmark Topic Watch Topic
  • New Topic