Dear all!
I am trying to write my first java application that makes connection to the database.
I use MS Access database. OS is Win95
In order to establish the connection I load a required driver first:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"
As far as I understand if the driver could not be found the error would be thrown here: "Failed to load the driver..."
However, when I am trying to get an instance of the Connection class [
con = DriverManager.getConnection(url, "", "" ]
the following error is thrown:
java.sql.SQLException: No suitable driver
I have checked the url string. It is "jdbcdbc:employee" where employee is the datasource name pointing to the MS Access employee.mdb. It is properly set in the Control Panel ODBC Microsoft Access Setup. In the datasource window I have got: employee(Microsoft Access Driver(*.mdb)).
In addition when I tried to run my program on a different computer (WinNT) it worked.
Thank you very much for your time and assistance on this problem.
I am trying to write my first java application that makes connection to the database.
I use MS Access database. OS is Win95
In order to establish the connection I load a required driver first:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"
As far as I understand if the driver could not be found the error would be thrown here: "Failed to load the driver..."
However, when I am trying to get an instance of the Connection class [
con = DriverManager.getConnection(url, "", "" ]
the following error is thrown:
java.sql.SQLException: No suitable driver
I have checked the url string. It is "jdbcdbc:employee" where employee is the datasource name pointing to the MS Access employee.mdb. It is properly set in the Control Panel ODBC Microsoft Access Setup. In the datasource window I have got: employee(Microsoft Access Driver(*.mdb)).
In addition when I tried to run my program on a different computer (WinNT) it worked.
Thank you very much for your time and assistance on this problem.