Home > Software engineering >  Seek a great god advice.. Where is wrong
Seek a great god advice.. Where is wrong

Time:10-08

//set the query string
/*
Cstrings strSQL;
StrSQL. The Format (_T (" select * from employees where employee number='% s' order by employee number desc "), strNum);
_bstr_t bstrSQL;
StrSQL bstrSQL=(_bstr_t);
//in m_pRecordset - every time & gt; Open () function error!!!!!!
*/


_bstr_t bstrSQL=_T (" select * from employees where employee number=6 order by employee number desc ");
//success!!!!!!

//create a recordset pointer to the object instance
M_pRecordset. CreateInstance (__uuidof (you));

//open the recordset
M_pRecordset - & gt; Open (bstrSQL, m_pConnection GetInterfacePtr (), adOpenDynamic, adLockOptimistic, adCmdText);

M_pRecordset - & gt; MoveFirst ();

CodePudding user response:

The try... The catch...
  • Related