A quick tip I learned today regarding creating ODBC connections.
I have a server with a 64bit OS trying to connect to an MS SQL 2008 database running on a Windows 2008 Standard 32 Bit using an ODBC connection for one of my applications.
When I created that connection, i kept getting the error:
The specified DSN contains an architecture mismatch between the Driver and Application
After looking into the problem, I found that the issue lies within the architecture of the OS. Since I’m running a 64 bit OS, the ODBC client is running a 64 bit version which is incompatible with the 32bit version.
The solution to this small problem is to create your ODBC connections in the 32bit client. Fortunately, Server 2008 64 bit has the 32 bit client already available. You can run it from c:\Windows\syswow64\odbcad32.exe
The ODBC client screen will be exactly the same as the 64bit version, only will have additional provider that don’t exist by default in the 64 bit version.
The DSN connections created in this case will all show up in both clients, so it is recommended that the DSN names in this case, be named with a _32 and _64 suffix, to differentiate between the connection strings.
You can read more about this in Microsoft KB942976