Creates a Workspace object and adds it to the Workspaces collection of the DBEngine object. Returns a reference to an instance of the Workspace object.
Applies to objects: DBEngine
[[Set] RetVal = ] object.CreateWorkspace ([workspaceName], [userName], [password]) |
The CreateWorkspace method syntax has these parts:
Part | Description |
object | Required. A reference to an instance of the object. |
workspaceName | Optional. An expression that returns a String value. The name of the Workspace object being created. It's used to identify the object in the collection. |
userName | Optional. An expression that returns a String value. The name of the user. |
password | Optional. An expression that returns a String value. The password. |
RetVal | Optional. A Workspace type variable. |
The user name and password will be used for connecting to the database unless the connection parameter string is specified in the OpenDatabase or OpenConnection methods of the Workspace object.
The created Workspace object is immediately added to the Workspaces collection of the DBEngine object, and it's not needed to call the Append method for it.
Dim engine As dbEngine Set engine = new dbEngine ' создаем новый Workspace Dim wspace As Workspace Set wspace = engine.CreateWorkspace("MyWorkspace", "mylogin", "mypassword") '... |
See Also |
DBEngine Object, Workspace Object, Workspaces Object. |