Yep, I've come across this exact same problem and received the same error
message. I'm a JDBC amateur so my answer may seem a little ignorant to the
savy programmer. I think I found that accessing the resultset out of order
caused the problem. For instance, if my SQL statement said "Select
firstname, middlename, lastname, address from PeopleTable", I would get the
error if I called rs.getString("lastname") before rs.getString
("firstname"). If I called the .getString methods in the same order (ie
firstname, middlename, lastname, address) as I called the columns in the
SQL statement, it worked ok. Maybe this has something to do with using a
non-scrollable resultset? I know you can't move backwards in the
recordset, but I'm wondering if this also applies to the columns within a
recordset?
Bill
[EMAIL PROTECTED]
B Alaguselvan
<[EMAIL PROTECTED] To: [EMAIL PROTECTED]
om> cc:
Sent by: A Subject: JDBC problem - Invalid
Descriptor Index
mailing list
about Java Server
Pages
specification and
reference
<JSP-INTEREST@jav
a.sun.com>
02/04/2000 06:37
PM
Please respond to
alagu
Hi All
I am using JRun with IIS. I am connecting to my SQL Server database with
JDBC-ODBC.
I have a query where i try to retreive data from 5 tables.
it goes something like this:
select t1.a as field1, t2.b as field2, t3.c as field3
from db1 t1, db2 t2, db3 t3
where t1.x=t2.x and
t2.y=t3.
when i retrieve the value of field1 thru:
String name = rs.getString("field1") or
String name = rs.getString(1
I get a sql exception:
SQLException: [Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index.
Theres no problem with the query. The problem seems to be in accessing the
value from the result set.
any pointers will be of great help.....
thanks
Alagu
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html