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

Last reviewed: March 16, 1998
Article ID: Q182389
The information in this article applies to:
  • ActiveX Data Objects (ADO), version 1.5

SUMMARY

The Adovcbm.exe sample demonstrates Bookmarks, recordset traversal, GetRows and other ActiveX Data Objects (ADO) Recordset methods using smart pointers and #import. Using #import is the preferred way for Visual C++ programmers to use ADO.

MORE INFORMATION

The following file is available for download from the Microsoft Software Library:

 ~ Adovcbm.exe (size: 111977 bytes) 

For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q119591
   TITLE     : How to Obtain Microsoft Support Files from Online Services

It is not necessary to use the absolute path for the ADO .dll file. You can add the path to Visual Studio IDE from the Tools menu under Options. Select the Directory tab and add the path to the Library files list, which allows you to use the statement:

   #import "Msado15.dll" rename_namespace("ado15")

The database file Adostudent.mdb is included with the sample. The sample opens a database connection with a DSN-less ConnectionString, so you do not need to specify a data source name (DSN).

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

REFERENCES

For additional information on ADO recordset manipulation using UpdateBatch and CancelBatch, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q181733
   TITLE     : FILE: Adovcbtd.exe #import Using UpdateBatch and CancelBatch

Keywords          : kbfile adovc
Technology        : ole
Version           : WINDOWS:1.5
Platform          : WINDOWS
Issue type        : kbhowto


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 16, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.