[This is preliminary documentation and subject to change]

# ADO Overview

ActiveX® Data Objects (ADO) provides a common programming model for any OLE DB data source; it is essentially a collection of objects that expose the attributes and methods used to communicate with a data source. ADO uses general OLE DB providers to accesse unique features of specific data sources; it also uses native OLE DB providers, including a specific OLE DB provider that provides access to Open Database Connectivity (ODBC) drivers. Designed to replace the need for all other high-level data access methods, ADO can access relational, Indexed Sequential Access Method (ISAM), or hierarchical databases, or any type of data source-as long as there is an ODBC-compliant driver.

ADO's ease of use, speed, and low memory overhead make it ideal for server-side scripting. In fact, ADO is the recommended technology for data access for ASP applications. ADO can be called directly from server-side scripts or from business components.

Unlike earlier data access methods, ADO does not require navigation through a hierarchy to create objects; most ADO objects can be created independently, which allows greater flexibility in reusing objects in different contexts and reduces memory consumption. ADO also takes advantage of ODBC 3.0 connection pooling for ODBC data sources, and session pooling for OLE DB providers. This eliminates the need to continuously create new Connection objects for each user, which is very resource intensive.

What ADO cannot do, however, is provide remote data to the client. Once the data has been retrieved and sent to the browser, the user cannot easily manipulate it or make changes to it within the client application. Data operations-including filtering and record modifications-must take place on the server, where the actual data manipulation objects reside. If your application design requirements include client manipulation of data, see Remote Data Binding with Remote Data Service.

OLE DB, the foundation of Microsoft's Universal Data Access model, is a set of COM interfaces that provides a standard way for programs to access data. The way your application uses ADO functionality will be partially determined by whether or not there is an OLE DB provider for the data. ADO is designed to work with OLE DB, and in most instances your ADO components will communicate with databases through OLE DB; you can also use ADO to communicate directly with the ODBC driver, if no OLE DB provider is available. Using ADO through an OLE DB provider has an impact on the following areas:

- Using Stored Procedures with ADO: Describes several key issues you should consider when using stored procedures.
- Choosing the Client Networking Library for ADO: Explains the issues surrounding the selection of a networking library and it's impact on database access speed.

For more information on ADO, see the ADO SDK documentation in the Platform SDK. For performance information, see Data Access Performance. To see examples of using ADO, see Database Connectivity under the ASP Script Examples in ASP Samples.

© 1997-2001 Microsoft Corporation. All rights reserved.