Adovcbm.exe ADO 1.5 with #import and Getrows/Bookmarks

This article was previously published under Q182389
This article has been archived. It is offered "as is" and will no longer be updated.
The Adovcbm.exe sample demonstrates Bookmarks, recordset traversal, GetRowsand other ActiveX Data Objects (ADO) Recordset methods using smart pointersand #import. Using #import is the preferred way for Visual C++ programmersto use ADO.
The following file is available for download from the Microsoft Download Center:
For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:
119591 How to Obtain Microsoft Support Files from Online Services
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.It is not necessary to use the absolute path for the ADO .dll file. You canadd the path to Visual Studio IDE from the Tools menu under Options. Selectthe Directory tab and add the path to the Library files list, which allowsyou to use the statement:
   #import "Msado15.dll" rename_namespace("ado15")				
The database file Adostudent.mdb is included with the sample. The sampleopens a database connection with a DSN-less ConnectionString, so you do notneed to specify a data source name (DSN).

The function CrackStrVariant takes a variant and returns a CString. Thisfunction was copied in its entirety from the DAOVIEW sample that ships withVisual C++.

For additional information on ADO recordset manipulation using UpdateBatchand CancelBatch, click the article number below to view the article in the Microsoft Knowledge Base:
181733 FILE: Adovcbtd.exe #import Using UpdateBatch and CancelBatch


Article ID: 182389 - Last Review: 10/07/2013 21:03:28 - Revision: 2.3

  • Microsoft ActiveX Data Objects 1.5
  • kbnosurvey kbarchive kbdownload kbfile kbinfo KB182389