I have been developing Java-based solutions with MS SQL server, ODBC driver
for MSSQL and JDBC-ODBC bridge. There is one especially annoying 'feature'
for which I'd hope to find an elegant workaround. Let's
suppose I have a table MyData with columns AA,BB,CC,DD.
I then do:
ResultSet rs = javaConnectionObject.executeQuery("select AA,BB,CC,DD from
MyData");
rs.readString("AA");
rs.readString("CC");
rs.readString("BB"); // here I get an java.sql.Exception: Invalid descriptor
index
This is most obviously due to the fact that the 'cursor' has moved past
column BB when column CC is read and it's unable to go back. This is very
annoying since I have huge queries with 40+ columns which I want to process
as efficiently as possible in my Java code. Of course, I could read them all
in specified order and store the values to local variables but that would be
awful waste of time. Any suggestions how to do this elegantly? Thanks.
++Jarkko
Todd Johnson
In article <nL2g3.155$9V2...@read2.inet.fi>,
"Jarkko Viinamäki"
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.