文档介绍://:Definestheentrypointfortheconsoleapplication.//#include""#include<iostream>#include<string>#include<vector>#include<>#import"C:/monFiles/System/ado/"no_namespacerename("EOF","adoEOF")usingnamespacestd;int_tmain(intargc,_TCHAR*argv[]){CoInitialize(NULL);//enviroment_ConnectionPtrpMyConnect(__uuidof(Connection));//定义连接对象并实例化对象_RecordsetPtrpRst(__uuidof(Recordset));//定义记录集对象并实例化对象try{//打开数据库//CStringstrConnect="DRIVER={Provider=;essDriver(*.mdb)};uid=;pwd=;DBQ=F://C++study//ADO//ADO//;";CStringstrConnect="DSN=RocketsPlayers;/DBQ=F://C++study//源程序//源程序//chap13//;/DriverId=25;FIL=ess;MaxBufferSize=2048;PageTimeout=5;";//CStringstrConnect="Provider=SQLOLEDB;DataSource=F://C++study//ADO//ADO//;";pMyConnect->Open((_bstr_t)strConnect,"","",NULL);//pMyConnect->Open("Provider=;DataSource=;PersistSecurityInof=False;","","",adModeUnknown);}catch(_com_error&e){cout<<"Initializedatabasefailed"<<endl;cout<<()<<endl;cout<<()<<endl;return0;}cout<<"ess!"<<endl;try{pRst=pMyConnect->Execute("select*fromRockets",NULL,adCmdText);if(!pRst->BOF){pRst->MoveFirst();}else{cout<<"Thedatainthetableisnull"<<endl;return0;}//存储表的所有列名vector<_bstr_t>column_name;for(inti=0;i<pRst->Fields->GetCount();i++){cout<<pRst->Fields->GetItem(_variant_t((long)i))->Name<<"/