Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Invalid Descriptor Index Solution

843810Sep 26 2002 — edited Jun 25 2003
Java Programmers,

I just wanted to share a problem with you and my answer to the problem in hope that it saves you time. It took me about an hour to figure out what was going on. The problem and answer is below.

PROBLEM:
-----------------------------------------------------------------
This error keeps occuring whenever I try to access data from a ResultSet.

java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6106)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6263)
at sun.jdbc.odbc.JdbcOdbc.SQLGetDataFloat(JdbcOdbc.java:3136)
at sun.jdbc.odbc.JdbcOdbcResultSet.getDataFloat blah blah blah

ANSWER TO PROBLEM:
------------------------
Unfortanetly, if you don't access your fields in order as they appear in the database you will get this error even if your descriptor is correct.


Hope this helps somebody,
Bruce
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 23 2003
Added on Sep 26 2002
2 comments
921 views