Number of record set elements

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.