Get old and new value of edited database field
Original Reporter info from Mantis: Zomis
-
Reporter name: Simon Forsberg
Original Reporter info from Mantis: Zomis
- Reporter name: Simon Forsberg
Description:
I've tried using TSqlite3Dataset.AfterEdit, TSqlite3Dataset.BeforeEdit, TDataSource.OnDataChange, TDataSource.OnUpdateData and get the datasets field.OldValue, field.NewValue, field.Value, field.CurValue - but they all return the same thing!
When using AfterEdit or BeforeEdit, they all return the old value,
when using the other events, they all return the new value.
AfterEdit and BeforeEdit is only executed on the first edit. If you edit a field, and go back to the field and edit it again (without changing row of the dataset), the event was only called for the first edit.
I'm using a TDBGrid connected to a TDataSource connected to a TSqlite3Dataset. And I want to log all the changes that is done manually in the TDBGrid, when I edit a field I want to get both the fields previous value and it's new value.
Mantis conversion info:
- Mantis ID: 8476
- Version: 0.9.20
- Monitored by: » luizamerico (Luiz Americo)