aspose file tools
The moose likes JDBC and the fly likes Invalid Descriptor Index Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Invalid Descriptor Index" Watch "Invalid Descriptor Index" New topic
Author

Invalid Descriptor Index

Paras Ahuja
Ranch Hand

Joined: May 22, 2012
Posts: 62


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
Bartender

Joined: Aug 22, 2010
Posts: 2328
    
    2

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.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Invalid Descriptor Index
 
Similar Threads
JTable
Generate JTable from a SQL Query containing UNION clause
Getting Last Record in Jtable
JTable+JPanel Parent Table and Child Table
Error java util NoSuchElementException