>Following problem: I have a DBF table that is open shared by multiple users. I like to detect if changes are done to the table, but since the table is opened shared and in use the timestamp of the actual DBF file does not change, until all users have closed the table.
>
>To do a query and comparison by content would be too slow. So I was wondering if there is some low level function approach I could use to detect the before-after differences? The simplest would be Reccount(), but I need to detect content changes where it does not change the recordcount.
Christian,
Use a trigger
in the table properties, replace the trigger expression with the current trigger() AND yourtrigger()
If it's an insert there's a change
if it's a delete, there's a change
if it's an update, you may need to compare ( don't remember) each field with its previous value - watch out for nulls when comparing
Remember, within a trigger
- you cannot modify the current table, not even go off the record
- you can open, change and close other tables
- restore the workarea if you have changed it
Gregory