ClassNotFoundException when trying to connect to .accdb file via JDBC-ODBC in Java 8

前端 未结 4 2025
猫巷女王i
猫巷女王i 2020-12-11 09:16

I\'m working in a project in Java in Eclipse EE IDE where I have to query a .accdb file. The problem is when I try to load the driver and then connect to the d

4条回答
  •  死守一世寂寞
    2020-12-11 09:52

    According to Oracle the JDBC-ODBC Bridge will no longer be included with JDK as of Java SE 8 and that

    The ideal is "Pure Java": no native code, no platform dependent features.

    that means looking for at least a JDBC type 3 or 4.

    Lance Andersen wrote:

    The JDBC-ODBC Bridge has always been considered transitional and a non-supported product that was only provided with select JDK bundles and not included with the JRE.

    The JDBC-ODBC bridge provides limited support for JDBC 2.0 and does not support more recent versions of the JDBC specification.

    You should either use any of third-part database drivers (as Microsoft doesn't provide for any) or use a previous version of java. Anyhow I suggest using a specific Driver, instead of the JDBC-ODBC one.

    For that you could look at any of the following:

    • EasySoft drivers
    • UCanAccess

提交回复
热议问题