views:

659

answers:

1

I recently migrated an older application we have at work from Java 1.5 to 1.6. I noticed that during the build, I now get a (new) compiler warning:

... DatabaseSession.java:[9,20] sun.jdbc.odbc.JdbcOdbcDriver is Sun proprietary API and may be removed in a future release

So I understand what that means, but is there a well-known alternative that is more open-standards friendly, not proprietary? What driver do you use and/or recommend and what are the advantages of it?

So far I have taken the approach that it compiles in 1.6, so we'll keep using it and we can find a replacement later if the next version of Java does not support it, and I will likely try to suppress the warning from showing up in the build. Am I wrong to think that?

+5  A: 

Yes, use a Type 4 JDBC driver for the database you're using.

The JDBC-ODBC brigde is one of the worst JDBC drivers that I had to pleasure to work with.

Alternatively you might want to look into third-party JDBC-ODBC bridges such as this Easysoft product, but I don't have any experience with those.

Joachim Sauer
+1, a type 4 is a joy to work with. No having to configure any OS-specific stuff, able to use the same JDBC driver on any platform, minimal intelligence required in the cross-platform installer. If the DB you're using doesn't have a type 4 driver, express your displeasure to the vendor (loudly).
paxdiablo
+1 for the usage of "worst" :)
Aaron Digulla