Establishes connection with a database and creates a new Database object.
Applies to objects: Workspace.
[[Set] RetVal = ] object.OpenDatabase([Name], [Exclusive], [ReadOnly], [ConnectionString]) |
The OpenDatabase method syntax has these parts:
Part | Description |
object | Required. A reference to an instance of the object. |
RetVal | Optional. A Database type variable. |
Name | Optional. A String type variable. The name of the connection being created. |
Exclusive | Optional. A Boolean type variable. A flag that indicates that database resources, used by the user will be blocked for other users. The default value is FALSE. |
ReadOnly | Optional. A Boolean type variable. A flag, that indicates that the database is opened only for reading. The default value is FALSE. |
ConnectionString | Optional. A String type variable. The connection initialization string. |
If the connection initialization string is omitted or doesn't contain the necessary parameters, the necessary information will be taken from the Workspace object.
....... |
See Also |
Database Object, Workspace Object, OpenConnection Method. |