Troubleshooting
Problem
When utilizing a 32-bit ODBC driver on a 64-bit platform to connect to an IBM Informix database server, an ODBC application will fail to connect indicating that there is an architecture mismatch.
Symptom
The error message returned from the Microsoft ODBC Driver Manager states: ERROR [IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application
Cause
The cause of the problem is that the ODBC application is compiled within Visual Studio and targeted as 'Any CPU' which means the application will run on either a 32-bit or 64-bit platform. The problem with this is that if the application is deployed on a 64-bit platform and utilizes a 32-bit ODBC provider, the application expects to utilize a 64-bit provider.
Environment
Windows
Diagnosing The Problem
The best way to diagnose the problem is to use Microsoft's Process Monitor and filter on the application executable to view what libraries the application is attempting to load prior to the failure.
Resolving The Problem
To resolve the problem, one needs to compile the application within Visual Studio targeted for an 'x86' CPU. This will ensure that the application attempts to load the 32-bit ODBC provider instead of the 64-bit one. You can do this by right clicking on your project and selecting Properties. In the build tab, you will find the Platform Target (ANY CPU, x86, x64 or Itanium).
Was this topic helpful?
Document Information
Modified date:
20 January 2022
UID
swg21651061