Workspace Object

Controls connections with databases and transactions. An instance of this object can be retrieved by using the CreateWorkspace method of the DBEngine object, or from the Workspaces collection.

Properties

Name The name of the object for indentification in the collection.
UserName The name of the user for accessing the database.
Password The password for accessing the database.
LoginTimeout Database login timeout.
QueryTimeout Query timeout.

Methods

OpenConnection Creates a database connection. Returns a Connection object.
OpenDatabase Creates a connection and projects the model of the database. Returns a Database object.
CreateProperty Creates a Property object, that describes a user-defined property.
Connections Provides access to the Connections collection.
Databases Provides access to the Databases collection.
Properties Provides access to the Properties collection.
BeginTrans Begins a transaction. All subsequent actions on the database will form part of this transaction.
CommitTrans Applies all database changes since BeginTrans was called.
RollbackTrans Ignores all changes in the database, occurred since BeginTrans was called. The database will be in the same state as before calling BeginTrans.
Close Closes all open database connections.

Remarks

The UserName and Password properties will be used for authentification in the OpenConnection and OpenDatabase methods, if the corresponding connection parameters are omitted.

By default, the LoginTimeout and QueryTimeout properties set a 15 second interval.

Using transactions at this level assumes that transactions will be used for all Connection and Database objects, that belong to the given Workspace object. Transactions can be also controlled at the level of the Connection and Database objects.

If a transaction hasn't been closed before calling the Close method, the CommitTrans function will be called automatically for the changes to come into force.

 

See Also

Connection Object, Connections Object, Database Object, Databases Object, DBEngine Object, Property Object, Properties Object, Workspaces Object, CreateWorkspace Method.