>

IsolateODBCTrans Property

Applies To

Workspace Object.

Description

Sets or returns a value that indicates whether multiple transactions that involve the same ODBC database are isolated.

True (-1) indicates to isolate transactions involving the same ODBC database. False (0) (the default) indicates not to isolate transactions involving the same ODBC database.

Remarks

In some situations, you need to have multiple simultaneous transactions pending on the same ODBC database. To do this, you need to open a separate Workspace for each transaction. Although each Workspace can have its own ODBC connection to the database, this slows system performance. Because transaction isolation isn't normally required, ODBC connections from multiple Workspace objects opened by the same user are shared by default.

Example

This example opens a Workspace and sets IsolateODBCTrans to True before starting a transaction.


Dim wrkDefault As Workspace
Set wrkDefault = DBEngine.Workspaces(0)
wrkDefault.IsolateODBCTrans = True
wrkDefault.BeginTrans


' Execute query to ODBC database and complete transaction.
...
...