Hi I have the below code to connect to MS Access database on Windows 7 OS. I have changed the Data Source short cut to point to 64bit odbc then 32 bit. But still getting the
If your Java app is running in a 64-bit Java Virtual Machine (JVM) then DRIVER={Microsoft Access Driver (*.mdb)}
is not going to work because there is no 64-bit version of the Jet database engine. You can...
DRIVER={Microsoft Access Driver (*.mdb, *.accdb)}
in your code.... or ...
DRIVER=
string. The related answer here might prove helpful if you choose this option.... or ...
Manipulating an Access database from Java without ODBC
You can install the 64 ODBC drivers for Access available from Microsoft
http://www.microsoft.com/en-us/download/details.aspx?id=13255
1) you will have to configure System dsn (Driver Microsoft Access Driver(.mdb,.accdb)) 2) link .mdb database in above configuration and write below code.
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String database = "jdbc:odbc:systemdsnname";
Connection conn = DriverManager.getConnection(database, "", "");