What are ActiveX Objects?

ActiveX Objects are a set of Component Object Model (COM) objects for accessing different data sources. A part of Microsoft Data Access Components (MDAC), ActiveX Objects provide a layer between Object Linking and Embedding, Database (OLE DB) and programming languages. ActiveX Objects allow a programmer and developer to write programs that can access data without knowing about the implementation of the database. You should only know about the database for connection purposes only. Knowledge of SQL is also not required to access a certain database when using ActiveX Objects; however, one can use ActiveX Objects for the execution of SQL commands. The main disadvantage of this is the introduction of a dependency on the type of database used.

ActiveX Data Objects is composed of 4 collections and 12 ActiveX objects:

  1. ActiveX Objects collections
    • Fields – This collection contains sets of Field objects. It can be used in either a Record object or Recordset object.
    • Properties – More than one property object is contained in this collection.
    • Parameters – It is possible for a command object to have several parameters commands in order to change the predefined behavior.
    • Errors – Errors created by providers are submitted to an Error object collection, whereas the Errors collection itself is exclusively contained inside a connection object.

      Having ActiveX problems? Use this ActiveX test tool to fix your issues.

  2. ActiveX Objects
    • Connection – This is ActiveX's connection to a certain data store via the OLE DB. It stores information about the sessions and provides the methods of connection to the data store.
    • Command – After the session to the data source has been established, the instructions are transmitted to the data provider through the command object.
    • Recordset – This is a group of records that either comes from the base table or as a result of the query to the table. It contains a Properties collection and a Fields collection.
    • Immediate – The recordset is locked through the adLockPessimistic or adLockOptimistic lock. The pieces of data are then updated at the data source after the changing of the record and calling of the Update.
    • Batch – The adLockBatchOptimistic is used to lock a recordset and is updated in the temporary buffer each time the Update is called.
    • Transaction – Transactions can be used whenever the OLE DB provider permits it. To start the transactions, the programmer or developer initiates the BeginTrans method and performs the required updates.
    • Record – This ActiveX object represents one record contained in the database. It also contains the Fields collection. A RecordSet is composed of a Record objects collection.
    • Stream – This is mainly used in the RecordSet object. It is a means of writing and reading a stream of bytes.
    • Parameter - This is the means of changing the behavior of a common functionality. For example, a stored procedure may have various parameters transmitted to it depending on what's required to be completed.
    • Field – Fields are contained in each record object, and each RecordSet object also contains a corresponding Field object.
    • Property – This is specific to a certain OLE DB provider and is used to define the ability a provider has already implemented.
    • Error – When the OLE DB provider error happens during the utilization of an ActiveX object, an error object in the errors collection will be created.

Windows and the Windows logo are trademarks of the Microsoft group of companies.
Microsoft is a registered trademark of Microsoft Corporation in the United States and/or other countries.