MFC数据库操作大全
1.获取单条记录/#importc:\ProgramFiles\CommonFiles\System\ADO\msado15.dll\no_namespacerename(EOF,EndOfFile)
/CoInitialize(NULL);_bstr_tvarSource=Provider=Microsoft.Jet.OLEDB.4.0;DataSource=%%0;//
.mdb//_bstr_tvarSource=DataSource=127.0.0.1;InitialCatalog=db2;UserId=<imgsrc="titter.gif"smilieid="9"border="0"alt=""/>assword=;_ConnectionPtrm_pConnection(_uuidof(Connection));m_pConnection-gt;Open(varSource,,,adModeUnknow);_RecordsetPtrm_pSet(_uuidof(Recordset));try{m_pSet-gt;Open(%%1,m_pConnection.GetInterfacePtr()adOpenDynamic,adLockPessimistic,adCmdText);。。。。。。。。。
MFC数据库操作大全.txt
(1. Get a single record/#importc:\ProgramFiles\CommonFiles\System\ADO\msado15.dll\no_ namespacerename(EOF,EndOfFile)
/CoInitialize(NULL);_ bstr_ tvarSource=Provider=Microsoft.Jet.OLEDB.4.0; DataSource=%%0;//
.mdb//_ bstr_ tvarSource=DataSource=127.0.0.1; InitialCatalog=db2; UserId=<imgsrc="titter.gif"smilieid="9"border="0"alt=""/>assword=;_ ConnectionPtrm_ pConnection(_uuidof(Connection)); m_ pConnection-gt; Open(varSource,,,adModeUnknow);_ RecordsetPtrm_ pSet(_uuidof(Recordset)); try{m_pSet-gt;Open(%%1,m_pConnection.GetInterfacePtr()adOpenDynamic,adLockPessimistic,adCmdText);。。。。。。。。。
MFC Database Operation.txt)
页:
[1]