Solutions for Local Data Access

Microsoft ActiveX Data Objects (ADO)

Solutions for Local Data Access

The Issue

You want a simple, consistent application programming interface (API) that enables applications to gain access to, and modify a wide variety of data sources. A data source may be as simple as a text file, as complex as a cluster of different types of databases, or something yet to be invented. Furthermore, the API should not presume the means of gaining access to and manipulating the data source.

Although these are your specific requirements, the typical data source is a relational database that supports the Open Database Connectivity (ODBC) standard and is manipulated with commands written in Structured Query Language (SQL).

The general solution Microsoft offers to this problem is OLE DB, a set of Component Object Model (COM) interfaces that provide uniform access to data stored in diverse information sources. However, because the OLE DB application programming interface is designed to provide optimal functionality in a wide variety of applications; it does not meet the requirement for simplicity.

You need an API that is a bridge between the application and OLE DB. ActiveX Data Objects (ADO) is that bridge.

The Solution

ADO defines a programming model—the sequence of activities necessary to gain access to and update a data source. The programming model summarizes the entire functionality of ADO.

The programming model suggests an object model—the set of objects that correspond to and implement the programming model. Objects possess methods—which perform some operation on data—and properties—which either represent some attribute of the data or control the behavior of some object method.

Associated with objects are events—which are notifications that some operation has occurred, or is about to occur.

Next   Basic ADO Programming Model.