Reputation: 7444
On Windows 7 64 bit machine, with Eclipse Kepler 64 bit, JDK6, I have this error:
SQL Error: java.sql.SQLException: [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application 0 IM014
This Q&A unfortunately didn't help me: https://stackoverflow.com/questions/6721702/windows-7-64-bit-odbc-drivers-for-ms-access-missing
"Target" was set to: %windir%\System32\odbcad32.exe
and "Start in" was set to: %windir%\System32
so, I changed it to:
"Target" to: %windir%\SysWOW64\odbcad32.exe
and "Start in" was set %windir%\SysWOW64
and later to %windir%\System32
- didn't work neither way.
I also had a look at this but the answer is not satisfying (installing 32 bit version of Java and STS) 64-bit Java can't access 32-bit MS Access database via ODBC
I tried to put the argument "-D32" in the VM arguments, but didn't help either.
Neither this one: Is there a Windows 7 ODBC driver for Access?
I read this as well: http://msdn.microsoft.com/en-us/library/ms712362(v=vs.85).aspx
but those are instructions for Visual Studio, in Eclipse KEPLER for Java SE, I don't know where to find options they suggest (compiling options x86 vs. x64)
Trying to use this architecture mismatch between the Driver and Application? without success. When I try to install 64 bit drivers it complains that I use 32 bit Office and therefore those drivers can't be installed. I installed 2007 Office System Driver: Data Connectivity Components but I gained nothing that previously weren't on system already http://www.microsoft.com/en-us/download/confirmation.aspx?id=23734
If I understood it properly, as I am using Windows 7 64 bit, with Eclipse Kepler 64 bit, JDK6, and Office Access 2007, I believe I should be using this:
Quote: To manage a data source that connects to a 32-bit driver under 64-bit platform, we use C:\Windows\SysWOW64\odbcad32.exe
What should I do in order to make it work (besides to install 32 bit Eclipse and 32 bit JVM as OP finally did here (64-bit Java can't access 32-bit MS Access database via ODBC)
Upvotes: 2
Views: 544
Reputation: 7444
This should be the complete "solution" for this problem:
%windir%\SysWOW64\odbcad32.exe
and set "Start in" to
%windir%\System32
Do what Elliot Frisch says:
And that's it.
Upvotes: 0
Reputation: 201447
You can use a 32-bit JRE in a 64 bit eclipse,
goto "Window > Preferences > Java > Installed JREs", then click "Add"
Then use this new 32-bit JRE a the target runtime for your "Access" project (under "run configuration").
Upvotes: 1