Article View: comp.lang.java.databases
Article #39JDBC-ODBC + SQL Server 6.5 + ResultSet + getString/getInt = SQLException
From: Jason R. Mihalick
Date: Wed, 26 Aug 1998 00:00
Date: Wed, 26 Aug 1998 00:00
24 lines
1617 bytes
1617 bytes
Hello,
I'm using JDK 1.1.6 (with JBuilder 2), the JDBC-ODBC bridge, and SQL Server
6.5 and have been experiencing some odd behavior from the
ResultSet.getString(String) and ResultSet.getInt(String) methods. The order
in which I execute the getXXX methods seems to matter for some reason.
For instance, I have a column named "settlement", which is a varchar field.
If I don't call rs.getString("settlement") before I call any of the other
getXXX methods, an SQLException is thrown that says: "[Microsoft][ODBC SQL
Server Driver]Invalid column number" If I put the getXXX calls in a certain
order (and I haven't figured out the pattern yet), then life is good, no
Exceptions thrown.
I've found that this happens with the ResultSet.getInt(String) method as
well. It's like there is some kind of problem with the hash tables that the
getXXX methods are using. On the other hand, it could be some dumb mistake
that I'm making!
Anybody ever see this kind of behavior?
Thanks in advance,
Jason
Technical Details
Message-ID:
<6s1ujp$g7g@enews1.newsguy.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1073da,91df2c8488888997,start X-Google-Attributes: gid1073da,public X-Google-Thread: 107d46,91df2c8488888997,start X-Google-Attributes: gid107d46,public From: "Jason R. Mihalick" <mihalick@ecr.net> Subject: JDBC-ODBC + SQL Server 6.5 + ResultSet + getString/getInt = SQLException Date: 1998/08/26 Message-ID: <6s1ujp$g7g@enews1.newsguy.com> X-Deja-AN: 385069063 Organization: http://extra.newsguy.com X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Newsgroups: comp.lang.java.databases,borland.public.jbuilder.database