ADO (ActiveX Data Objects) is an object oriented API (Application Programming Interface) by which a programmer can have an application access data sources through an OLE DB Provider (Object Linking and Embedding DataBase).

Here are two basic arrangements of the ADO object model.

ADO Object Tree 9 Classes and 4 Collections

Here is an elaboration of the ADO objects tree:

  • The Connection object represents the connection of the other objects to the data source. The connection object must be created, opened, used by the other objects, closed, and then released.
    • The Command object represents the command (usually a SQL command) and possibly parameters. The command is usually run by, but can also be run with command.execute. Usually the latter is needed if parameter are used or the command executes but does not return a result set.
      • The Parameter object represents a parameter in a command. To use a parameter object, it must be created, assigned a value, and the appended to the command object.
    • The Recordset object represents the result set. Of the ADO objects, the recordset object is probably the most important. The result set is usually put in a recordset object by or with command.execute.
      • The Record object represents a row in a recordset, or a file or directory in a file system.
      • The Field object represents a column in a result set. Fields are usually accessed as properties of recordset objects.
    • The Error object represents an error encountered by the ADO objects, especially on the data provider.
  • The Stream object represents a stream of text or binary data.

The Property object represents information pertaining to an object that can be read or set. Like the field objects, property objects seem like extensions of its parent object.

GeorgeHernandez.comSome rights reserved