ado在dll中使用如下的头文件
#pragma warning(disable:4146)
#import "C:\Program Files\Common Files\System\ADO\msado15.dll" named_guids rename("EOF","adoEOF"), rename("BOF","adoBOF")
#pragma warning(default:4146)
using namespace ADODB;
"Provider=SQLOLEDB,Data Source=serverName;Initial Catalog=databaseName;User ID=userName;Password=userPassword;"
#import "c:\program files\common files\system\ado\msado15.dll" no_namespaces rename("EOF","adoEOF")
http://www.pconline.com.cn/pcedu/empolder/gj/vc/0507/653859.html