Use 32-bit version of ODBC on 64-bit Windows 7?

浪子不回头ぞ 提交于 2019-12-30 06:17:06

问题


I'm having problem with ODBC and an application written with Visual Basic 6 (so it's 32-bit). It seems that the ODBC library of VB6 is not compatible with the 64-bit ODBC of Windows 7.

The error code returned is -2147220992 and it's rambling about incompatible architectures.

Can I install a 32-bit version of ODBC? Or any other alternatives?


回答1:


use the 32-bit odbc manager to add your DSN:

C:\Windows\SysWOW64\odbcad32.exe

that should be able to see the 32-bit odbc driver.




回答2:


You need to use the 32 bit version of ODBC. You can't mix 32 and 64 bit code in the same process.

However, that may not be your problem. That error code is, I think, CONNECT_E_NOCONNECTION and there could be all sorts of reasons why you get that, and no necessarily down to 32/64 bit driver issues. For example, did you define the ODBC connection (DSN) with 32 bit admin tools?

Finally, I would recommend that you quote precise error messages rather than using phrases like "rambling about incompatible architectures". Precise information will help track down the problem.




回答3:


As mentioned above:

C:\windows\SysWow64\odbcad32.exe is the location for the 32-bit version of the ODBC Administrator.



来源:https://stackoverflow.com/questions/6713308/use-32-bit-version-of-odbc-on-64-bit-windows-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!