ActiveX Data Objects
ADO is Microsofts universal data-access technology. This means that it can be used to obtain data from almost any source.
There are three versions of ADO in common use: 2.1, 2.5 and 2.6. Version 2.5 comes as standard with Windows 2000 or higher.
When using ADO you must have a reference to (Microsoft ActiveX Data Objects 2.5 Library) or the corresponding version in your Tools > References for that current Project
ADO doesn't actually access the data source directly but through a OLE DB.
Most OLE DB providers are specific to a single type of data source
Dynaset - a query based recordeset
You have the option to The default cachesize is 1 for ADO, which makes a trip for every row.
ADO is much simpler to use than OLE DB and can be classified as a high-level database interface. Also, ADO can be used with more programming languages than OLE DB. ADO provides an Automation interface. This enables ADO to be used from scripting languages, such as VBScript and JavaScript.
This replaces DAO for Office 2007+
Objects
Out of the seven objects four of them (Connection, Command, Recordset and Parameter) can be created and manipulated independently of the others.
These objects can then be associated with others at run-time via the properties ActiveConnection and ActiveCommand.
Connection -
Command - Allows you to issue commands to the database
RecordSet - An array of rows
Parameter - A collection
Stream - Not commonly used in Excel or Word applications
ADO will create objects even if you do not create them explicitly. For example a Recordset object always requires a connection object.
When a recordset is opened by passing a connection string, (and not a connection object), ADO creates an invisible connection object for you.
You should always explicitly create your connection object and re-use it where possible to avoid creating multiple connections to the same data source each time code is executed
Fields Collection
| Name | Type | Description |
| Attributes | Property | Sets or returns the attributes of the field |
| Name | Property | Sets or returns the name of the field |
| Numeric Scale | Property | adjusts the scale of the field (only applicable on field types asNumeric & adSmallInt) |
| Precision | Property | adjusts the precision of the field (only applicable on field types asNumeric & adSmallInt) |
| AppendChunk | Method | Appends long binary |
| OriginalValue | Property | Returns the original value in the field |
| UnderlyingValue | Property | Returns the current value of the field |
| ActualSize | Property | Returns the actual length of a fields value |
| DefinedSize | Property | Returns the defined size of the field |
| Status | Property | Returns the status of the field |
| Type | Property | Sets ot returns the type of the field |
| Value | Property | Sets or returns the value of the field |
| GetChunk | Method | Returns all or part of the contents of a large text or binary data field |
Properties Collection
This contains any extended provider specific propertues for the Connection object
Errors Collection
Allows you to retrieve information when an error occurs
This contains not only errors but messages and warnings.
This collection should really be analysed if a collection cannot be made to the relevant data source
This object contains details about data Access errors that have been generated suring a single operation.
Extension Library
References
Microsoft ADO Ext. 2.5 for DDL and Security
Microsoft ADO Ext. 2.6 for DDL and Security
SS - include from References dialog
© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext