Workspaces Collection

   Methods   Properties

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







Remarks

Use the CdbWorkspace object to manage the current session or to start an additional session.

When you first refer to or use a CdbWorkspace object, you automatically create the default workspace, DBEngine.Workspaces(0). The settings of the Name and UserName properties of the default workspace are "#Default Workspace#" and "Admin," respectively. If security is enabled, the UserName property setting is the name of the user who logged on.

You can create new CdbWorkspace objects with the CreateWorkspace method. After you create a new CdbWorkspace object, you must append it to the Workspaces collection if you need to refer to it from the Workspaces collection. You can, however, use a newly created CdbWorkspace object without appending it to the Workspaces collection.

To refer to a CdbWorkspace object in a collection by its ordinal number or by its Name property setting, use either of the following syntax forms:

Workspaces[0]

Workspaces["name"]