Class DBEngine (DAO VBA)

The DBEngine object is the top level object in the DAO object model.

Methods

OpenConnection - expression .OpenConnection(Name, Options, ReadOnly, Connect)


Dim strName As String: strName = 
Dim cnnOpenConnection As Connection
cnnOpenConnection = OpenConnection(Name:=strName)

OpenDatabase - Opens a specified database and returns a reference to the Database object that represents it.


Dim strName As String: strName = 
Dim dbOpenDatabase As DAO.Database
Set dbOpenDatabase = OpenDatabase(Name:=strName)

BeginTrans - Begins a new transaction.

CommitTrans - Ends the current transaction and saves the changes.

CreateDatabase - Creates a new Database object, saves the database to disk, and returns an opened Database object (Microsoft Access workspaces only).

CreateWorkspace - Creates a new Workspace object.

Idle - Suspends data processing, enabling the Microsoft Access database engine to complete any pending tasks, such as memory optimization or page timeouts (Microsoft Access workspaces only).

RegisterDatabase - Enters connection information for an ODBC data source in the Windows Registry. The ODBC driver needs connection information when the ODBC data source is opened during a session.

Rollback - Ends the current transaction and restores the databases in the Workspace object to the state they were in when the current transaction began.

SetOption - Temporarily overrides values for the Microsoft Access database engine keys in the Windows Registry (Microsoft Access workspaces only).

Properties

Workspaces (Default member) - Returns a Workspaces collection that contains all of the active, unhidden Workspace objects.

DefaultPassword sets the password used to create the default Workspace when it is initialized.

DefaultType sets or returns a value that indicates what type of workspace will be used by the next Workspace object created.

DefaultUser sets the user name used to create the default Workspace when it is initialized.

Errors returns an Errors collection that contains all of the stored Error objects for the specified object.

IniPath sets or returns information about the Windows Registry key that contains values for the Microsoft Access database engine (Microsoft Access workspaces only).

LoginTimeout sets or returns the number of seconds before an error occurs when you attempt to log on to an ODBC database.

Properties returns the Properties collection of the specified object.

SystemDB

Version rreturns the version of DAO currently in use.

Database - A Database object represents an open database.

Errors - An Errors collection contains all stored Error objects, each of which pertains to a single operation involving DAO.

Properties - A Properties collection contains all the Property objects for a specific instance of an object.

Workspace - A Workspace object defines a named session for a user. It contains open databases and provides mechanisms for simultaneous transactions and, in Microsoft Access workspaces, secure workgroup support.

Workspaces - A Workspaces collection contains all active, unhidden Workspace objects of the DBEngine object. (Hidden Workspace objects are not appended to the collection and referenced by the variable to which they are assigned.)