This article has been archived. It is offered "as is" and will no longer be updated.
Adoacc.exe is a self-extracting compressed file containing sample code thatdemonstrates how to use ActiveX Data Objects (ADO) with Microsoft Access97. The sample code may be converted to use Microsoft Access 2000.
The following file is available for download from the Microsoft Download Center:
NOTE: Microsoft Technical Support does not support the use of ADO version1.x within Microsoft Access 97. This sample is provided purely forinformational purposes. Furthermore, this does not demonstrate or referenceany OLE DB Provider for Jet. The access to ADO is being done via the OLE DBProvider for ODBC Drivers.
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.
About the ADOACC Sample
The sample Adoacc.mdb database contains four ADO procedures/functions thataccomplish the following:
Open a parameterized query against a Microsoft Access database.
Expose Dynamic and built-in properties for each ADO object that supports them.
Provide a code template (and helper functions) required for minimal handling of errors raised either by the underlying data provider or from ADO itself.
Create and execute a Stored Procedure against SQL Server that returns a result set as well as an output and return parameters. (This sample is written for the SQL Server ODBC Driver shipping with ODBC 3.x, which requires you to close the recordset before retrieving the output and return parameters.)
NOTE: The OLE DB provider for ODBC must be installed on the computer thatruns the Adoacc.mdb file. The provider is available as part of theMicrosoft Data Access Components (MDAC). The most current version of the MDAC components can be downloaded from:
The structure of the ADO Samples is standardized so that methods, functionsand procedures share the same name. Often the layout of comments andwhitespace is the same. This allows you to use the WinDiff utility includedwith both Microsoft Visual C++ and the Microsoft Platform SDK, to compareindividual files, or even entire directories.
Key module names have been used in each version of the sample to aid inthis comparison:
ADOCORE: Contains the event handlers for the four separate routines that demonstrate using ADO. (This is not in the Microsoft Access 97 sample. The code in question resides behind the main form.)
ADOUTILS: Contains helper routines for error handling, or for code shared by more than one of the ADO event handlers. (Present in the Microsoft Access 97 sample.)
LOG: Where necessary, contains advanced exception handling code (for C++ and Java in particular). Visual Basic, Visual Basic for Applications and VBScript do not have a need for this kind of extended error handling.NOTES:You should replace the Reference to Microsoft ActiveX Data Objects 2.0 Library with a Reference to the latest version of Microsoft ActiveX Data Objects Library.
For additional information, please see the following Web site:
This is one of several identical samples implemented using ADO withinvarious products, as listed below. The advantage is that these articleshave an identical interface/functionality, demonstrating both thesimilarities and differences in using ADO with different languages andenvironments.
QNumber and Title
172403 FILE: Adovb.exe Demonstrates How to Use ADO with Visual Basic