0
votes

I'm using Windows 7 64 bit version and I have installed Office 32 bit Version. Currently I am developing a library management system by using Access.

The problem I am having is that whenever I try to connect to the Access file I am getting following error.

Errorjava.sql.SQLException: [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application

I tried by running following ODBC version also from windows

c:\windows\sysWOW64\odbcad32.exe

I did connect my access file from that. But still I am getting above error.

1
Wouldn't it make sense that you'd need a 64 bit driver for a 64 bit OS? Why are you using Access instead of SQL Server, MySQL, PostgreSQL, or any other relational database?duffymo
Which version of Java are you running (32/64-bit)?Cᴏʀʏ
@duffymo thanks for you reply. Yeas I'm using MySQL (navicat) for my other java applications. but for this project we have been specially asked by our lecture to created db in Access. Yeas as you and ederollora suggested ill reinstall office 64 and try run the application.user3003900
@Cory How can we check the java version ?user3003900
You're still out of luck - there's no JDBC-ODBC bridge driver in 64 bit JVMs from Oracle. Sun added it in 32-bit JDK 1.0, but it's not available now.duffymo

1 Answers

0
votes

I had this problem a couple of days ago. First you should try to use the 32-bit JDK (For example: JDK version 6u45 would be = "Windows x86 --- 69.85 MB --- jdk-6u45-windows-i586.exe" ) and check if using 32-bit JDK and 32-bit driver works together works.

In case it doesn't work, you should uninstall the 32-bit Office version and install a 64bit version which will carry the suitable 64-bit driver you need. Once you install it, you'll be able to run the java app and connect to the database properly.

You can also try to download this file (AccessDatabaseEngine_X64.exe) that will install the driver on your computer (In my case I needed to query an Access database, don't know if that's your case) but I think it won't let you install it until you uninstall the 32-bit driver.

Note:

As Cory states: "if you ever want to build an SSIS package that reads from an Excel file, it will not work with 64-bit Office installed."