// 设置查询字符串
/*
CString strSQL;
strSQL.Format(_T("select * from employees where 员工编号 = '%s'order by 员工编号 desc"),strNum);
_bstr_t bstrSQL;
bstrSQL = (_bstr_t)strSQL;
// 每次在m_pRecordset->Open()函数出错!!!
*/
_bstr_t bstrSQL = _T("select * from employees where 员工编号 = 6 order by 员工编号 desc"); 
//成功了!!! //创建记录集指针对象实例
m_pRecordset.CreateInstance(__uuidof(Recordset)); //打开记录集
m_pRecordset->Open(bstrSQL,m_pConnection.GetInterfacePtr(),adOpenDynamic,adLockOptimistic,adCmdText); m_pRecordset->MoveFirst();