1 error C2065: “_ConnectionPtr”: 未声明的标识符

在测试c++连access操作数据库时编译提示这个

 

解决办法: 把 #import "c:\program files\common files\system\ado\msado15.dll" \
 no_namespace \
 rename ("EOF", "adoEOF")         这段放到 stdafx.h 中即解决,原来是放到cpp源文件头部