------------------------------------------------------------------------------------------------------
1.导入msado15.dll
#include "stdafx.h"
#include "MySQLTest.h"
#include "MySQLTestDlg.h"
#import "C://program files//common files//system//ado//msado15.dll" no_namespace rename ("EOF", "adoEOF")
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
2.在控制面板打开ODBC管理器,查看本机安装的MySQL驱动,我的是 MySQL ODBC 5.2w Driver
,截图如下:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3.编写连接MYSQL数据库的代码:
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
效果截图:
---------------------------------------------------------------------------------------------
您的十分满意是我追求的宗旨。
您的一点建议是我后续的动力。