Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JDBC:ODBC Bridge Problem?

3 views
Skip to first unread message

Geoffrey Wiseman

unread,
Apr 4, 2001, 3:31:48 PM4/4/01
to
Summary of Problem:
I'm using the JDBC:ODBC Bridge to connect to SQL Server. When attempting to
retrieve a value from a column that contains a null, the bridge seems to be
dying on me. If I replace that null with a value, it's fine. Same thing
happens with getObject( ), which seems to just funnel the call through to
getString( ) anyway.

Is this a known issue? Is there anything I can do about getting around it?

Error trace (from JUnit Test Report):
Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.516 sec

Testcase: testGetCompanyForKey took 0.516 sec
Caused an ERROR
null
java.sql.SQLException
at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:285)
at sun.jdbc.odbc.JdbcOdbcResultSet.getObject(JdbcOdbcResultSet.java:1607)
at sun.jdbc.odbc.JdbcOdbcResultSet.getObject(JdbcOdbcResultSet.java:1672)
at com.mediumone.tenzing.Company.<init>(Company.java:45)
...

--

Disclaimers:
Yes, I know the bridge is not production ready. Buggy, unstable.
Yes, I know there are commercial drivers. This particular project can't
afford one right now.
Yes, I know there's a free SQL Server driver (FreeTDS). No such luck, it
doesn't support the featureset I'm already using.
Yes, I know there are other databases out there, but if there's a way around
this, I'd like to know for future reference.
And lastly, yes, I know that Merlin's due soon and that JDBC 3.0 might fix
my problem.

Thanks in advance,

- Geoffrey Wiseman


Hartmut

unread,
Apr 6, 2001, 5:27:36 AM4/6/01
to
I use:
JDK 1.3-C
MS SQLServer 7 on NT 4 SP 4
I can read null values by getString().

Your Exception message is very strange.
What is this com.mediumone.tenzing.Company.<init> ???
Do you have such a class / method in your classpath?
Is there a class installed "replacing" a JDBC class?

What if you would post your classpath?

But with all your background knowledge you mentioned my
suggestions may sound silly to you.
Nethertheless - I tried to help ...

Hartmut


0 new messages