Looking for DAO CommitTrans Example

polina

Registered User.
Local time
Today, 23:12
Joined
Aug 21, 2002
Messages
100
Please if anybody has an example of the transaction using DAO, share it with me.

I am copying two huge tables and want to be able to rollback the Delete or Insert statements in case something happens during the process of Inserting or Deleting.

Please help

Thanks
 
dim wsp as workspace

set wsp=DBEngine.Workspaces(0)

'start transaction
wsp.BeginTrans

- your code here

'Transaction finished
if YourConditionSatisfied = true then
wsp.CommitTrans
else
wsp.Rollback
end

- your code continued
 

Users who are viewing this thread

Back
Top Bottom