Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to trap /log Modifications to a Table
Message
From
11/11/2007 20:08:04
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01268335
Message ID:
01268396
Views:
14
>Hi.
>I want to update a Log file of all modifications to a table.
>I would have numerreous screens and PRG files where the table is updated
> and am looking for 1 place to put code, rather than having to go back into each screen or prg file.
>I typically would have a combination of:
>
>1. An append and Replace
>Sele MyTable, Appe Blank, Replace Myfield with Newfield
>2. A seek/locate and replace
>Seek MyKey If Not eof() Replace Myfield with Newfield
>3. An Insert
>Inert into MYTbale .....
>
>Ideally, If I could use a trigger somewhere in the Database (its in a DBC container) it would be ideal, but am not sure if these just work for inserts or will they also work woth Append and Replace ?
>If I can avoid it, I dont want to have to go back into each form and Prg and start amending.
>
>Any help appreciated
>Regards
>Gerard

I wrote an introductory article about this topic (audit log) in Universal Thread Magazine, may 2003 (available online).

A commercial product like FoxAudit will likely give you better options, and save you the trouble of programming such options yourself.
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