Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Audit Trail using a grid to modify data
Message
De
19/06/2003 23:14:04
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
19/06/2003 22:13:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00801858
Message ID:
00802043
Vues:
30
>I could learn about these triggers, but I was hoping to find a quicker easier way to do it. Do you know of an easier way to do this with grids?

Triggers are not really difficult, and their big advantage is that they work no matter where you do the changes.

My article (the one about the audit-trail) includes a complete - albeit simple - audit function, and instructions on how to use it. You might use this as a starting-point.

The basic idea about triggers is really simple: every time a record is added / modified / deleted, a corresponding function is called. The fact that this is defined at the table level gives you a tremendous control which you didn't have in the FoxPro 2.x days.

I would strongly suggest you forget about an incomplete solution, like one that works only for a grid on specific forms. For instance, you could easily overlook a REPLACE, GATHER, INSERT INTO, etc. command somewhere in your code.

Apart from those considerations, Before/ and After/RowColChange seem to be the appropriate events to check for changes in a grid.
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