Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Invalid Descriptor Index  RSS feed

 
Paras Ahuja
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I am getting this error.
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid descriptor index

I have used the same code so many times, i never got this error. But now suddenly it doesn't work.
Please help
 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In JDBC, all numberings start at one. This is terribly unfortunate design decision, but at least it is consistent across the whole JDBC API. It therefore applies to ResultSetMetaData.getColumnName() too; you're trying to access column at index 0, which does not exist.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!