By
www.gudianxiaoshuo.com
This article is organized by Code Assistant software to publish content unrelated to the software
more enjoyable reading, more enjoyable writing, easier publishing
Xiuse book software can be heard, readable, writable, knowledge mining, can be labeled, plus the history of the most powerful pure text color matching function, instantly make your book text xiuse up.
To determine whether a column item in a recordset is empty
_variant_tVarvalue; Varvalue=Precordset->getcollect(_t("Class"));if(Varvalue.vt!=vt_null){Banjistr=(Lpctstr)_bstr_t(Varvalue);}ElseContinue;
Number of records
_RecordsetPtr Precordnum; Numstr.format(_t("SELECT * from ClassInfo ORDER by ID")); Precordnum->putcursorlocation(adUseClient);//Add this statement to use GetRecordCount()Get the number of records in the recordset Precordnum->open( (Lpctstr)Numstr, M_pconnectionstu.getinterfaceptr(), adOpenStatic, adLockOptimistic, adCmdText);if(Precordnum->adobof)return;ElsePrecordnum->movefirst();intNum=Precordnum->GetRecordCount(); Precordnum->movelast();
Number of record set elements