Subject Sequence of changes under transaction
Author rlssv
Can I trust the sequence of edits and changes done by triggers under
transaction control ?

My situtation is this

I am Using Delphi 5 and the Tdataset compatible IBO components.

I have a table Members with a balance-field among other things.
I have a table Postings with payments etc... This table has a trigger
updates the Balance-field of the member (OnAfterInsert)

When receiving a payment I open the member table to find the
name/adress and
balance of the member.
I *may* put the Member table in edit-state (the operator may edit some
When the operator finishes entering payment info I start the
then post the member table and then insert the payment-record, so
that the
trigger updating of the Balance comes last.
Finally commiting the changes.

(I did first have an error in updating balance due to the fact that I
posting the member with its original contents AFTER the trigger had
the balance-field)

My problem is now that *sometimes* the balance is not right as if it
has not
been updated by the trigger or as if the update is overwritten with
original balance.
So my question is: Is it possible that this sequence can be reverted
in some
cases ?

- René, SSV