4,011
社区成员
发帖
与我相关
我的任务
分享
CString strQuery= "select * from UserList where UserName='chp845'";
try
{
m_pRecordset->Open(_variant_t(strQuery),_variant_t((IDispatch *)m_pConnetion,true), // 获取库接库的IDispatch指针
adOpenStatic,
adLockOptimistic,
adCmdText);
m_pRecordset->MoveFirst();
m_pRecordset->Delete(adAffectCurrent);
}
catch(_com_error ex)
{
AfxMessageBox(ex.Description());
return FALSE;
}
DELETE from UserList where UserName='chp845'