是否有使用 sun.jdbc.odbc.JdbcOdbcDriver 的替代方法? [英] Is there an alternative to using sun.jdbc.odbc.JdbcOdbcDriver?

查看:52
本文介绍了是否有使用 sun.jdbc.odbc.JdbcOdbcDriver 的替代方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近将我们正在使用的一个旧应用程序从 Java 1.5 迁移到 1.6.我注意到在构建过程中,我现在收到一个(新的)编译器警告:

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 是 Sun 专有的 API,可能会在未来版本中删除

所以我明白这意味着什么,但是有没有一个众所周知的替代方案,它对开放标准更友好,而不是专有的?您使用和/或推荐什么驱动程序,它的优点是什么?

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?

到目前为止,我采用了它在 1.6 中编译的方法,因此我们将继续使用它,如果下一版本的 Java 不支持它,我们可以稍后找到替代品,我可能会尝试取消警告从出现在构建中.我这样想有错吗?

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?

推荐答案

是的,使用 Type 4 JDBC 驱动程序用于您正在使用的数据库.

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

JDBC-ODBC brigde 是我不得不乐于使用的最糟糕的 JDBC 驱动程序之一.

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

或者,您可能想查看第三方 JDBC-ODBC 桥接,例如 这个 Easysoft产品,但我对这些没有任何经验.

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.

这篇关于是否有使用 sun.jdbc.odbc.JdbcOdbcDriver 的替代方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆