Number of record set elements and number of elements
Author:Www.gudianxiaoshuo.com
This article is organized by the Code Assistant Software and released content is irrelevant to this software.More comfortable reading, more comfortable writing, and easier Publishing
The show-colored book and Text software is audible, readable, writeable, knowledgeable, and annotated. Coupled with the most powerful pure text color function in history, you can instantly show your book and text.
An empty column in the determination record set
_ Variant_t varValue; varValue = pRecordSet-> GetCollect (_ T ("class"); if (varValue. vt! = VT_NULL) {banjiStr = (LPCTSTR) _ bstr_t (varValue);} else continue;
Number of records
_ RecordsetPtr pRecordNum; numStr. format (_ T ("Select * from ClassInfo order by ID"); pRecordNum-> PutCursorLocation (adUseClient); // you can use GetRecordCount () to add this statement () obtain the number of records in the record set pRecordNum-> Open (LPCTSTR) numStr, m_pConnectionStu.GetInterfacePtr (), adOpenStatic, adLockOptimistic, adCmdText); if (pRecordNum-> adoBOF) return; else pRecordNum-> MoveFirst (); int num = pRecordNum-> GetRecordCount (); pRecordNum-> MoveLast ();