CString str;
str.Format("SELECT * FROM sbcx WHERE BXZH=%s ORDER BY     ND",m_strRcvBxzh);

::CoInitialize(NULL);
_RecordsetPtr pRs;
   
_bstr_t query=str; try{  pRs.CreateInstance("ADODB.Recordset");
IADORecordBindingPtr picRs(pRs);
                  pRs->Open(query, 
                  "dsn=s1;uid=zyh;pwd=zyh;", 
                  adOpenStatic, adLockOptimistic, adCmdText);
         }
         catch(_com_error &e)
         {
             MessageBox(e.ErrorMessage);
         }
我这样做,处理时总是出现IDispatch error #3101错误,哪位能告诉我,错在哪里,多谢!