>>>I have implemented an audit log on one of my tables as an experiment, by adding an Update trigger for that table in the DBC. I am using buffering mode 5 (Table buffering, not row)
>>>
>
>>
>>Perhaps it is the following: A field, and the record it belongs to, will be marked as "modified" if the user makes a change, or if you use a command like REPLACE - even if the original value remains intact. For instance, the user sees a "5" and types "5" over it.
>>
>>Hilmar.
>
>
>Hilmar,
>
>I actually thought of that and tested it. It will log a change even if you do not edit the record at all. I think it is to do with using table as opposed to row buffering, but I haven't revisited the problem just yet...
If you want to test whether there is a
real change, you may want to check MyField vs. oldval("MyField") for each and every field, as part of your audit log functions, before logging the change.
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)