Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

64 bit ODBC Exception

I am getting the following ODBC exception when I moved my development platform from Windows XP X86 to Windows 7 X64:

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

What I'm sure it means is that the server it is connecting to is 32 bit, and the computer I'm running on is 64 bit and the ODBC driver in use is 64 bit.

The application I am writing is set to run in 32 bit mode because some of the third-party software that we employ is not 64 bit compatible.

I tried downloading a 32 bit driver and changing the DSN but it did not fix my issue. I still get the exception.

If anyone has any links for 32 bit SQL drivers, or any ideas on how I could fix this by changing the project around, I'm all ears.

Thanks in advance,

-Jrud-

like image 880
Jrud Avatar asked Dec 22 '09 16:12

Jrud


People also ask

Can a 32-bit application use a 64-bit ODBC driver?

Yes, you can connect a 32-bit application to a 64-bit ODBC driver by using the ODBC-ODBC Bridge. Without the ODBC-ODBC Bridge, a 32-bit application cannot connect to a 64-bit ODBC driver.

How do I run 32-bit ODBC on 64-bit?

To work around this problem, use the appropriate version of the ODBC Administrator tool. If you build and then run an application as a 32-bit application on a 64-bit operating system, you must create the ODBC data source by using the ODBC Administrator tool in %windir%\SysWOW64\odbcad32 .exe.

Is my ODBC driver 32 or 64-bit?

Answer. On Windows 32-bit systems, the ODBC driver is 32-bit if the nsqlodbc. dll file is located in the C:\WINDOWS\system32 directory. Both 32-bit and 64-bit programs can run on 64-bit Windows OS.


Video Answer


1 Answers

It sounds more that you've setup a 32-bit DSN using the 64-bit ODBC Administrator :

http://msdn.microsoft.com/en-us/library/ms712362(VS.85).aspx

Try using this ODBC Administrator instead :

c:\windows\sysWOW64\odbcad32.exe

like image 65
MartW Avatar answered Jan 03 '23 01:01

MartW