java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver Exception occurring. Why?

后端 未结 5 1889
暗喜
暗喜 2020-11-22 09:13

I have created an MS Access database and assigned a DSN to it. I want to access it through my Java application.

This is what I am doing:

public class         


        
5条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-22 09:56

    For Java 7 you can simply omit the Class.forName() statement as it is not really required.

    For Java 8 you cannot use the JDBC-ODBC Bridge because it has been removed. You will need to use something like UCanAccess instead. For more information, see

    Manipulating an Access database from Java without ODBC

提交回复
热议问题