tonyhatwork
Programmer
Hi,
I have two recordsets (one record in each ) that are being updated with recordset.update.
I want to be able to rollback if either of these records is locked.
Does begintrans only permit rollback for a single recordset ?
I have tried a couple of methods, one being :
on error goto errorhandle
workspace.begintrans
workspace.begintrans
rs1.update
workspace.committrans
workspace.begintrans
rs2.update
workspace.comittrans
workspace.committrans
errorhandle:
workspace.rollback
end
end sub
I keep on getting err 3034 - you tried to commit or rollback a transaction without first beginning a transaction
Should I re-write my sql to retrieve both records joined together ?
The database is microsoft jet in a multi-user environment.
Thanks in advance of your assistance.
Tony
I have two recordsets (one record in each ) that are being updated with recordset.update.
I want to be able to rollback if either of these records is locked.
Does begintrans only permit rollback for a single recordset ?
I have tried a couple of methods, one being :
on error goto errorhandle
workspace.begintrans
workspace.begintrans
rs1.update
workspace.committrans
workspace.begintrans
rs2.update
workspace.comittrans
workspace.committrans
errorhandle:
workspace.rollback
end
end sub
I keep on getting err 3034 - you tried to commit or rollback a transaction without first beginning a transaction
Should I re-write my sql to retrieve both records joined together ?
The database is microsoft jet in a multi-user environment.
Thanks in advance of your assistance.
Tony