Is there an alternative to using sun.jdbc.odbc.JdbcOdbcDriver? [closed]

[亡魂溺海] 提交于 2019-12-23 15:09:03

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/732264/is-there-an-alternative-to-using-sun-jdbc-odbc-jdbcodbcdriver

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!