Share via


DAO Workspace: Opening a Separate Transaction Space

OverviewHow Do IFAQSampleODBC Driver List

A workspace defines a single transaction space for all databases open within it. This means that if you begin a transaction in a workspace, then update several recordsets on several databases in the workspace, and then commit or roll back the transaction, the commitment or rollback applies to all of the databases.

Sometimes, however, you need to separate one set of transactions — applying to database A — from another set — applying to database B.

To open a separate transaction space

  1. Construct a new object.

  2. Call the workspace object's member function. Specify a unique name in the lpszName parameter to make this workspace distinct from the default workspace or any other workspaces. Each workspace you create explicitly has a different name.

  3. Open one or more databases in the new workspace.

  4. Run transactions on the new workspace.

Transactions on the new workspace will be distinct from those on other workspaces. For related information about ODBC data sources, see the article DAO External: Working with External Data Sources and see .

For a general discussion of using transactions, see the article DAO Workspace: Managing Transactions. That article also leads you to topics in DAO Help.

See Also   DAO: Where Is..., DAO Workspace: Managing Transactions, DAO: Creating, Opening, and Closing DAO Objects