odbc – The specified DSN contains an architecture mismatch between the Driver and Application. JAVA

odbc – The specified DSN contains an architecture mismatch between the Driver and Application. JAVA

None of these did it for me. I did find the answer on MSDN. There were hints to it though. The architecture in the error is referring to 32 vs 64 bits. My solution was to find out which my app is running under (Access) which 2010 is 32b. I found this by looking in the Process tab of Task Manager where all 32b processes have * 32 the end of their names. As was said, the control panel will launch the 64 bit version of ODBC from here

c:windowssystem32odbcad32.exe

and the 32 bit version is here:

c:windowssysWOW64odbcad32.exe (easiest to copy and paste into run dialog)

So I set up DSNs with names ending in 32 and 64 in each of the corresponding ODBC control panels (AKA Administrator) that pointed to the same thing. Then, I picked/pick the correct one based on whether the app using it is 32b or 64b.

You get this exact same error when trying to connect to a MySQL database from MS-Access when the bit version (32 vs 64) of Access doesnt match

  1. the bit version of the ODBC Driver you are using
  2. the bit version of the ODBC Manager you used to set it up.

For those of you trying to connect MS-Access to MySQL on a 64 bit Windows system, I went through sheer torture trying to get it to work with both MS-Access 2010 and MS-Access 2013. Finally got it working, and here are the lessons Ive learned along the way:

I bought a new Windows 7, 64 bit laptop, and I have an app which relies on MS-Access using MySQL tables.

  1. I installed the latest version of MySQL, 5.6, using the All In One package install. This allows you to install both the database and ODBC drivers all at once. Thats nice, but the ODBC driver it installs seems to be the 64 bit one, so it will not work with 32 bit MS-Access. It also seems a little buggy – not for sure on that one. When you Add a new DSN in the ODBC Manager, this driver appears as Microsoft ODBC For Oracle. I could not get this one to work. I had to install the 32 bit one, discussed below.

    • MySQL was working fine after the install. I restored my application MySQL database in the usual way. Now I want to connect to it using MS-Access.

  2. I had previously installed Office 2013, which I assumed was 64 bit. But upon checking the version (File, Account, About Access), I see that it is 32 bit. Both Access 2010 and 2013 are most commonly sold as 32-bit versions.

  3. My machine is a 64 bit machine. So by default, when you go to set up your DSNs for MS-Access, and go in the usual way into the ODBC Manager via Control Panel, Administrative Options, you get the 64 bit ODBC manager. You have no way of knowing that! You just cant tell. This is a huge gotcha!! It is impossible to set up a DSN from there and have it successfully connect to MS Access 32 bit. You will get the dreaded error:

    the specified dsn contains an architecture mismatch…

  4. You must download and install the 32 bit ODBC driver from MySQL. I used version 3.5.1

    http://dev.mysql.com/downloads/connector/odbc/3.51.html

  5. You must tell the ODBC Manager in Control Panel to take a hike and must instead explicitly invoke the 32 bit ODBC Manager with this command executed at the Start, Command prompt:

    c:windowssysWOW64odbcad32.exe

    I created a shortcut to this on my desktop. From here, build your DSN with this manager. Important point: BUILD THEM AS SYSTEM DSNS, NOT USER DSNS! This tripped me up for awhile.

    By the way, the 64 bit version of the ODBC Manager can also be run explicitly as:

    c:windowssystem32odbcad32.exe

  6. Once youve installed the 32-bit ODBC Driver from MySql, when you click Add in the ODBC Manager you will see 2 drivers listed. Choose MySQL ODBC 5.2 ANSI Driver. I did not try the UNICODE driver.


That does it. Once you have defined your DSNs in the 32 bit ODBC manager, you can connect to MySQL in the usual way from within Access – External Data, ODBC Database, Link to the Database, select Machine Data Source, and the DSN you created to your MySQL database will be there.

odbc – The specified DSN contains an architecture mismatch between the Driver and Application. JAVA

Theres an architecture mismatch. Your JDBC Driver and your JDK should be of the same architecture. If your using 32bit Driver and your JDK is 64bits, you would get that error.

See this

Fix : Depends on your architecture.

You will need 64-bit drivers if your Java is 64-bit.

Download :
http://www.microsoft.com/downloads/details.aspx?familyid=C06B8369-60DD-4B64-A44B-84B371EDE16D&displaylang=en

Leave a Reply

Your email address will not be published.