VS2008 C++ ODBC mysql datasource

Linker: http://blog.csdn.net/ztz0223/article/details/7614091

Hyperlink before introduce the basical ODBC between VS2008 C++ project and Mysql datasource.

The issue I met is 

MySQL ODBC "architecture mismatch" Error

Sovle solution:

If you attempt to use ODBC to run a MySQL application and run into the following error:

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

This means there is a 64-bit versus 32-bit mismatch.

Most likely, you're running 64-bit Windows, as well as 64-bit MySQL ODBC connector, but the application is 32-bit.

If this is the case, you will also need to install the 32-bit MySQL ODBC connector, and then create the connection from the 32-bit ODBC.

odbcad32.exe is the file to create the connections. Both 64-bit and 32-bit files have the same name, just differing locations.

This is the default location for the 64-bit ODBC:

C:\Windows\System32\odbcad32.exe

This is the default location for the 32-bit ODBC:

C:\Windows\SysWOW64\odbcad32.exe

And should you need to install MySQL ODBC, there are good instructions here (both for MSI and Manual installs).

Hope this helps.

Reason : Machine version 32 bit and 64 bit.

posted @ 2016-01-22 16:57  飞在风口的猪  阅读(240)  评论(0编辑  收藏  举报