connection.getMetaData().getDatabaseProductName()
Brought to you by:
ickzon
net.sourceforge.jtds.jdbc.ConnectionJDBC3.connection.getMetaData().getDatabaseProductName() returns "ASE", while the Sybase jconn3 driver returns "Adaptive Server Enterprise".
Some frameworks such as EclipseLink uses connection metadata to determine which database it is connected to, it would be nice if the two drivers behaved uniformly.
I absolutely agree with that point, but at the same time there may be other projects depending on the current jTDS behavior. I'm not sure whether we can really touch this without breaking other applications.
Btw. the value returned by jTDS ist not hardcoded, it is sent by the server during login. So I'd say jTDS does it "right", even if jConnect returns anything else.
I fully understand the backwards compatibility issue, and it makes sense to pass the value from the server without modification. Why on earth would the Sybase driver change this value! - Nothing should suprise me though, as the current Sybase driver is utterly broken, and has been for over a year! It contains a CharsetProvider, that returns a null iterator causing Charset.availableCharsets() to throw a nullpointer exception. A lot of frameworks such as Spring calls Charset.availableCharsets().
Currently the the broken Sybase driver is preventing me from upgrading to a newer version of EclipseLink, and I was hoping jTDS could help me. I'll do a feature request to EclipseLink to have them support Sybase through jTds, looks like jTDS + SqlServer + EclipseLink works out-of-the-box.
So would you agree this this tracker item can be closed?
Cheers,
momo
Yeah.
You can close it up.
/Klaus