
Roll back transaction Error handling
How do I prevent this scenario?
I have a routine that such as the following.
on error goto errHandler
validation code etc.
.BeginTrans
rst edits etc.
.committrans
exit sub
errHandler:
rollback
Everything is fine unless an error occurs before the begintrans line then my
error handler returns an error because I try to rollback a trans without
begintrans.
How do I handle this?