The ADO Interface
ADO is built upon another layer called the OLE-DB. ODBC is one
popular OLE-DB provider. ADO capabilities can vary depending
upon the OLE-DB provider. Ado Capabilities can also vary widely
depending upon the ODBC driver used. For example most ODBC
drivers do not support all the cursor types, (cursor types are
Exploring the ADO
The ADO Object model consists of seven objects namely:
The Connection, Command and Recordset objects each have a
collection of properties. The Connection object also maintains
a collection of Error objects detailing the errors we encounter
while making database connections. Each member of this collection
is a Field object which in turn contains information about
individual fields in the Recordset.
However the Connection, RecordSet and Command objects are the
most commonly used objects for interaction with databases. The
different objects are used depending on the complexity of the
The Connection object is used to establish a connection to a
database and can be used for simple database queries like select,
insert, delete, update etc. It can be also used for other complex
manipulations like stored procedures, but they are better done by
The RecordSet object is used for updating records, querying
multiple tables and fields. Unlike the Connection object, the
RecordSet gives more information on the transaction like the
number of records updated, records deleted etc.
The Command object is capable of running stored procedures
and SQL statements with multiple and complex parameters.
The Field object represents an individual field in the
RecordSet. It is generally used in conjunction with the
RecordSet object for more flexibility in programming.
The Parameter object represents a parameter in a SQL stored
The Error object represents the ADO errors.
The Property object provides properties of different data
providers like MS-Access, SQL Server etc.