0

I'm trying to get information from a MS Access database using Java.

First, I added ODBC from here

C:\Windows\SysWOW64\odbcad32.exe

since I'm working on Windows 7.

and then , I used this code

String driver = "sun.jdbc.odbc.JdbcOdbcDriver";
Class.forName(driver);         

String db = "jdbc:odbc:DataSource";
con = DriverManager.getConnection(db);

But I got this error

[Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application

after googling this error, I think the problem is that I'm working on Windows 7 64-bit and MS Office 32-bit. The question is how can I solve this problem without having MS Office 64-bit?

Thank you.

0

1 Answer 1

1

On the almight msdn, I quote:

If you use the 64-bit odbcad32.exe to configure or remove a DSN that connects to a 32-bit driver, for example, Driver do Microsoft Access (*.mdb), you will receive the following error message:

The specified DSN contains an architecture mismatch between the Driver and Application

To resolve this error, use the 32-bit odbcad32.exe to configure or remove the DSN.

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks, but how can I use the 32-bit viersion of odbcad32.exe? I tried to use this c:\windows\system32\odbcad32.exe, but when the ODBC is opened, and when I press Add button, I get nothing in the Create New Data Source dialog. So, I can add a new drive.
As I have read, I have to use C:\Windows\SysWOW64\odbcad32.exe because I'm working on Windows 7!
@user1178619 did you read the entire link? the 32 in odbcad32.exe doens't mean it is version 32-bit. You have to maybe download the 32-bit version of odbcad32.exe if you don't have it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.