MDAC 2.5 SDK - Technical Articles


 

ActiveX Data Objects (ADO)

Microsoft ActiveX Data Objects (ADO) is the strategic and standard data access model for Microsoft rapid application development (RAD) environments, such as Microsoft Visual Basic®, Microsoft Office Developer, Microsoft Visual Interdev®, and Microsoft Visual J++®. ADO uses a small set of Automation objects to provide a very simple and efficient interface to OLE DB, which, in turn, provides access to a very wide variety of data stores across the enterprise.

This simple interface to OLE DB is very important. OLE DB is a powerful interface for manipulating data, but most application developers do not need the low level of control that OLE DB gives over the data-access process. Most developers are not interested in managing memory resources, manually aggregating components, and controlling other low-level operations. Additionally, developers often use high-level languages that do not support function pointers and other C++ call mechanisms. This makes ADO ideal for them.

Because ADO uses Automation, it is available from all leading RAD environments, database tools, and languages on the market today. ADO is designed to be the one data interface needed for n-tier client/server and Web-based data-driven solution development. This makes ADO virtually language independent.

ADO provides dual dispatch interfaces. This means that some languages, such as Visual Basic, Scripting Edition (VBScript) in Active Server Pages or JScript® in Internet Explorer, can use a slower but highly flexible interface to call ADO procedures. Other languages, such as Visual Basic and C++, can take advantage of a shortcut to make calling procedures go much faster.

ADO is meant to eventually incorporate all the functionality of Data Access Objects (DAO) and Remote Data Objects (RDO) and, for most common purposes, it can do that now. ADO looks very similar to DAO and RDO because Microsoft took the best features of both models and put them together in a common programming model. It uses similar conventions with simple semantics to make it a natural step for DAO and RDO developers.

By itself, ADO provides the most often needed data access features. However, there are a few areas where it does not provide enough features. Fortunately, ADO is complemented with two other components, which makes nearly every data access task possible.

These two other components are designed to work closely with ADO. ADO Extensions for Data Definition Language and Security (ADOX) make it simpler to perform schema creation and modification, as well as security functions. ADO Multidimensional (ADO MD) provides a simple interface to multidimensional recordsets (often called cubes or hierarchical data).