IsolateODBCTrans Property Example

This example opens three ODBCDirect workspaces and sets their IsolateODBCTrans properties to True so that multiple transactions to the same data source will be isolated from each other.

Sub IsolateODBCTransX()

   DBEngine.DefaultType = dbUseJet

   Dim wrkJet1 As Workspace
   Dim wrkJet2 As Workspace
   Dim wrkJet3 As Workspace

   ' Open three ODBCDirect workspaces to separate 
   ' transactions involving the same ODBC data source.
   Set wrkJet1 = CreateWorkspace("", "admin", "")
   wrkJet1.IsolateODBCTrans = True

   Set wrkJet2 = CreateWorkspace("", "admin", "")
   wrkJet2.IsolateODBCTrans = True

   Set wrkJet3 = CreateWorkspace("", "admin", "")
   wrkJet3.IsolateODBCTrans = True

   wrkJet1.Close
   wrkJet2.Close
   wrkJet3.Close

End Sub