Reputation: 1582
I am trying to connect to MS Access 32bit using 64bit JVM. It gives me following error:
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
This has already been addressed in several questions and the possible solution is to install Microsoft Access Database Engine 2010 Redistributable from here.
But which file I should download of the two - AccessDatabaseEngine.exe or AccessDatabaseEngine_x64.exe?
I am using JDK7u25 64bit with MS Access 2010 32bit on Windows7 64bit os.
Upvotes: 2
Views: 811
Reputation: 123819
When opening a Jet/ACE ("Access") database directly from another application the "bitness" of the ODBC driver must match the "bitness" of the application. So, to connect from a 64-bit Java application you need to have the 64-bit version of the Access Database Engine (a.k.a. "ACE") installed. Therefore, for your current configuration you would need to install AccessDatabaseEngine_x64.exe
.
While in theory it shouldn't really matter whether the version of the Microsoft Access application is 32-bit or 64-bit, in many cases the 64-bit ACE installer will abort if it finds 32-bit versions of Microsoft Office applications on the machine. If that happens then you will need to do one of two things:
Replace the 32-bit version of Access with the 64-bit version, or
Switch to a 32-bit Java environment.
Upvotes: 1