6.4. The DBEngine Object

The DBEngine object is a property of the Access Application object, and represents the top-level object in the DAO model. The DBEngine object contains all the other objects in the DAO object hierarchy, yet unlike many of the other DAO objects, you can't create additional DBEngine objects.

The DBEngine object contains two major collections: Workspaces and Errors. These are described in this section because they relate so closely to the DBEngine object.

6.4.1. The Workspaces Collection

A workspace is a named user session that contains open databases and provides the facility for transactions and (depending on the type of workspace) user- and group-level security. As you can have more than one workspace active at any time, the Workspaces collection is the repository for all the workspaces that have been created.

As mentioned earlier, DAO maintains two different object models, depending on the type of data source you want to manipulate, and it is the Workspace object that determines which model you use: Microsoft Jet or ODBCDirect.

To access Microsoft Jet databases and ODBC or installable ISAM data sources through the Jet database engine, you use the Microsoft Jet workspace. To access ODBC data sources through DAO (bypassing Jet), you use ODBCDirect workspaces. The type of data source you connect to, and the DAO objects, properties, and methods you can use, depends on the type of workspace you create.

For a list of the collections, objects, and methods supported ...

Get Access 2003 VBA Programmer's Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.