1、VC++ mfc 连接2010 Access 数据库,查询之后显示效果如下图:
2、步骤如下:
a)头文件中添加;
#include
#import "C:\Program Files\Common Files\System\ado\msado15.dll" no_namespace rename ("EOF", "adoEOF")
如下图:
b)程序信息如下图:
c) 代码如下图:
// TODO: Add your control notification handler code here
try {
m_list.AddString("1");
USES_CONVERSION;
::CoInitialize(NULL);
_ConnectionPtr con(_uuidof(Connection));
_RecordsetPtr rst(_uuidof(Recordset));
_CommandPtr cmd(_uuidof(Command));
m_list.AddSt