Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQL Error: java.sql.SQLException: [Microsoft][ODBC Driver Manager]

 
Nenad Bulatovic
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:
http://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).

I tried to put the argument "-D32" in the VM arguments, but didn't help either.

Neither this one:
http://stackoverflow.com/questions/2013837/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

and this
http://social.msdn.microsoft.com/Forums/vstudio/en-US/097ff93d-20be-41ed-b318-dc51cca0b811/the-specified-dsn-contains-an-architecture-mismatch-between-the-driver-and-application?forum=wcf

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
http://stackoverflow.com/questions/2810754/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

I also read this one:
http://social.technet.microsoft.com/Forums/sqlserver/en-US/a4ddb239-64d8-4074-978c-45c30381c107/ssrs-2012-error-im014-microsoftodbc-driver-manager-the-specified-dsn-contains-an-architecture?forum=sqlreportingservices

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 (http://stackoverflow.com/questions/12220914/64-bit-java-cant-access-32-bit-ms-access-database-via-odbc?rq=1)
 
Roger Sterling
Ranch Hand
Posts: 426
Eclipse IDE Fedora Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You installed the 32-bit driver. You need to remove that one and install the 64-bit driver.
 
Nenad Bulatovic
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roger Sterling wrote:You installed the 32-bit driver. You need to remove that one and install the 64-bit driver.


That won't do the job either.
Access (Office 2007 is 32 bit).

Final solution was:

1.
Control Panel --> Administrative Tools --> Right Click then Properties then Shortcut tab,
set "Target" to %windir%\SysWOW64\odbcad32.exe and set "Start in" to %windir%\System32

2.
Download and install 32 bit JDK

3.
Go to "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").


If you think you have better solution - please advise.
 
Roger Sterling
Ranch Hand
Posts: 426
Eclipse IDE Fedora Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can have multiple drivers. 32-bit for your 32-bit apps, and 64-bit for your 64-bit apps. Name your ODBC data source names differently per the driver you want to use.

This is a simple issue. You should be able to solve it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic