AfterPost Event.

Speed

Member²
I'm trying to implement an auditing facility for an application. The TOracleDataset.AfterPost event is used to pass TDataset to a method which collects the relevant information and then passes it to a class.

I'm using TDataset.UpdateStatus to check what happened, ie. Insert, Update or Delete. Insert and Update work fine, but when a record is deleted I get usUnmodified instead of usDeleted. Any ideas?
 
I thought it was a bit strange but the usDeleted threw me off. I have used the AfterPost to collect information about records inserted or updated, and BeforeDelete for any records that are deleted. AfterDelete is no good because the record is already gone. The auditing code scans all fields in the table look for changes and documents them. For deleted records the primary key is recorded.

Regards,

Steve
 
Back
Top