Subject Strange Behaviour in Rollback
Author Eric Handbury

(BCB6-SP2, IBO4_2Hf, FB-1.0-796, Enh2.1.2)

I am getting an AV from TIB_Transaction.SysCancelAll when I do a
RollBack in a certain situation.

The situation is a Master-Detail relationship as follows:
1) User selects RollBack
2) My qrMaster.Before/AfterCancel Events are called.
3) Within the AfterCancel Event I close qrDetail, and de-allocate
it (the query was dynamically allocated).
4) The SysCancelAll procedure continues looking for Datasets to
cancel, and since qrDetail is still in its Dataset list, tries to
access it and, hence, the Access Violation is generated.

The solution is for the SysCancelAll to have a try-catch block
which handles the AV and continues on its merry-way cancelling other
Datasets. I will try and see if this solution works (although I work
in BCB and adding .pas files to my project doesn't always work).