bolek evora
bolek evora

Reputation: 251

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

how can i fix this error? ERROR [IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application.. it is occuring in a new project that i am doing... im using vb 2008 , MYSQL as my database and windows 8.1 as my OS

i read on forums that you just fix with the odbc administrator tool... i tried creating my DSN there but it still doesnt work... i tried opening an old project of mine it works fine.. but this new project keeps getting that error.. i need this to work so that i can do my crystal reports.. i've been trying to fix this error for a full day now and i cant fix it..

can someone help me? THANKS..

Upvotes: 24

Views: 97136

Answers (5)

user2990854
user2990854

Reputation:

its a 64 vs 32 bit issue. You are accessing a 32 bit odbc driver on a 64 bit system.

IF YOU OPEN c:\windows\system32\odbcad32.exe you will not see a driver there that is in c:\windows\syswow64\odbcad32.exe (or just the opposite)

Check the target platform of your application, and if that doesn't fix it, you might be able to sneak by just installing the correct driver ( 64 or 32 bit )

If you are debugging the project from Visual Studio, you will also need to run it as 32-bit. In order to do this you need to open the project properties by right clicking on the project and selecting properties. Once here you need to set Run64BitRuntime to FALSE.*

enter image description here

Upvotes: 24

Craig
Craig

Reputation: 440

For those running things in IIS Express, this can be fixed by the Bitness setting in the project properties under the Web section. As seen in the screenshot below

Visual Studio project property settings

Upvotes: 2

Manny Ramirez
Manny Ramirez

Reputation: 148

This is how I solved it to access a MS Access database via ODBC. Make sure that your bit architecture matches everywhere. For instance, in my case this is the only setup that worked on my W10 pro 64 bit PC, accessing a MS Access database hosted on a W2012 64 bit server. On my PC:

  • Install XAMPP 32bit (I tried 64 bit, but it gave me the "architecture mismatch" error)
  • Install AccessDatabaseEngine.exe 32 bit version (available from Microsoft)
  • Configure your data source using the 32 bit program: C:\Windows\SysWOW64\odbcad32.exe. There I selected the "Microsoft Access Driver (*.mdb, *.accdb)" driver.

Upvotes: 1

Fad Sel
Fad Sel

Reputation: 99

RESOLVED !

  1. Go to IIS.
  2. Choose Your app pool.
  3. Go To Advanced Settings, and
  4. Enable enable32bitAppOnWin64

Upvotes: 5

anhtv13
anhtv13

Reputation: 1818

After searching on the internet I found the solution for my .vb project:

  1. Open ODBC Data Sources (32-bit) (location: C:\Windows\syswow64\odbcad32.exe)
  2. Open tab System DNS
  3. Add -> Sybase ACE ODBC Driver -> Fill in Name (example: DSN_32), net work address (address and port, example: 192.168.1.1,4100) and database name -> Test connection ->OK

enter image description here

  1. From your application, update your connection string to use DSN=DSN_32 Example:

value="PWD=123456;DSN=DSN_32;UID=123456;SRVR=123456;DB=123456"

enter image description here

Hope this helps.

Upvotes: 7

Related Questions