Skip to Content.
Sympa Menu

freetds - Re: How many people use the JDBC driver?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Curt Hagenlocher" <curt AT hagenlocher.org>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: Re: How many people use the JDBC driver?
  • Date: Wed, 20 Jun 2001 09:20:40 -0700


> I am interested to find out how many other people are actually
> using the jdbc driver (especially in production) and if it is
> still under active development.

We are using the JDBC driver at one production site, and I've
been making changes and enhancing our local version. I've got
output parameters mostly done, and have added preliminary support
for the TDS 8.0 data types. I'm about 80% done converting the
unit tests to JUnit.

The driver is in serious need of refactoring, IMO.

> I found that in some circumstances, exceptions are not being thrown
> when a bad update is executed, for example when a field value is
> too long.
>
> The problem seems to be that if you get a warning as well as an error,
> the addOrReturn sets the exception value to null and subsequently the
> exception isnt thrown.

It's actually a considerably more complicated problem that
touches on the need for refactoring. In a nutshell,

1. The TDS packet handling code is duplicated between Statement,
PreparedStatement_base, ResultSet_base, and Tds (if not other
places). Each of these has slightly different logic.
2. The sequence (exception warning) is often handled incorrectly.
Some places do it by raising the exception, leaving the Tds state
in a bad place. Some do it by (as you found) overwriting the
exception with the warning, and therefore not raising the error.
3. None of the code will correctly deal with the results of
executing the batch "raiserror 99999 'Doh!' select 1 ONE".

I haven't figured out how to deal with #3 yet, which is the main
thing keeping me from fixing it.

> Recently I found a problem that I fixed (at least for my purposes)
> and I submitted the changes to freetds-jdbc-bugs AT internetcds.com,
> but with no reply.

With all due respect to Craig and the amazing work he's done,
maybe it's time to add committers to the project.

--
Curt Hagenlocher
curt AT hagenlocher.org




Archive powered by MHonArc 2.6.24.

Top of Page