Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table Buffering and the Update Trigger
Message
De
07/02/2003 10:08:07
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
06/02/2003 14:48:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00749080
Message ID:
00750571
Vues:
19
>>>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)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform