Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating an audit trail
Message
From
25/11/2002 18:09:28
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
25/11/2002 17:29:56
Kam Lee
SUNY-Health Science Center
Brooklyn, New York, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00726703
Message ID:
00726722
Views:
13
>Hi all,
>
>Any free tool for doing audit trail around? How would you approach
>doing audit trail if you need to track who is doing what and when in a VFP database system?
>
>Thanks in advance.
>
>Kam.

You can do it yourself, it is not very complicated.

Add trigger expressions to all three table triggers: insert, delete, update. You can have a single audit function, and call it with the appropriate parameter: MyAudit("U"), MyAudit("I") and MyAudit("D").

The trigger function must basically go through all the fields, comparing the current value with the oldval() for the field. Documentation is confusing on this; I found that it works both with buffered and with unbuffered tables (documentation seems to indicate you need buffering).

Copy information you find appropriate into a special audit table.

HTH, 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)
Previous
Reply
Map
View

Click here to load this message in the networking platform