CDaoWorkspace::BeginTrans

void BeginTrans( );
throw( CDaoException, CMemoryException );

Remarks

Call this member function to initiate a transaction. After you call BeginTrans, updates you make to your data or database structure take effect when you commit the transaction. Because the workspace defines a single transaction space, the transaction applies to all open databases in the workspace. There are two ways to complete the transaction:

Closing the workspace object or a database object while a transaction is pending rolls back all pending transactions.

If you need to isolate transactions on one ODBC data source from those on another ODBC data source, see the SetIsolateODBCTrans member function.

For information about transactions, see the article DAO Workspace: Managing Transactions. For more information about workspaces, see the article DAO Workspace. Both articles are in Visual C++ Programmer's Guide.

CDaoWorkspace OverviewClass MembersHierarchy Chart

See Also   CDaoWorkspace::GetIsolateODBCTrans, CDaoWorkspace::CommitTrans, CDaoWorkspace::Rollback