title: Getting java.sql.SQLException: Invalid column index while inserting into table
body: <p>I have been working with a snippet of code where <code>java.sql.SQLException: Invalid column index</code> is being thrown at <code>runtime</code>.</p>
  
  <p>I have worked several times in past with this exception and every time i find that developer has used wrong indexes while using <code>rs.getsString()</code> method.</p>
  
  <p>But my problem this time is that i am getting this exception while inserting the records into the table. Can any one please suggest what is the reason why i am getting this exception while inserting into the database?</p>
  
  <p>Also i am not able to see the query being executed at the time of exception because the driver being used (oracle drivers) don't print the query when i try to use <code>prepareStmt.toString()</code>. This method print the object reference instead.</p>
  
  <p>Please help. Any help is highly appreciated.</p>
  
  <p>Best Regards
  Anubhav Jain!</p>