I’m working with Embarcadero Delphi XE2 and Firebird DB, using TIBDatabase, TIBTransaction and TIBTable components. In a form user can edit data of a DB table and commit/rollback the changes when he wants. When he closes the form I’d like to ask him if he wants to commit/rollback pending changes.
But only if there are pending changes. Otherwise I don’t want to bother/confuse the user. How can I determine it? I tried Active and InTransaction transaction’s properties, but they are always true. If it can be usefull, note that I set AllowAutoStart to true on the transaction. Thanks!
You could keep track of the pending updates yourself: turn the flag on in your table’s
AfterDeleteandAfterPostevents; turn it off inAfterTransactionEnd: