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 by Microsoft Jet and ODBCDirect workspaces, refer to Appendix C.

The Workspace object contains four different object collections. In Microsoft Jet workspaces, these are Databases, Groups, and Users. In ODBCDirect workspaces, they are the Databases and Connections collections. Each of these collections is described in later sections.

0 0

Post a comment