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

喜夏-厌秋 提交于 2019-12-05 03:40:43

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 )

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

  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"

Hope this helps.

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