Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Good practice of tracking table changes
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01369848
Message ID:
01369861
Vues:
9
>>Hi,
>>
>>Once in a while when I look at my competitors databases (not necessarily VPF) I see that almost every table has a column of DateTime type indicating when the record was last time changed. My tables don't have such a column. Is it a good practice to have a DateTime column in every table to store when the record was last changed?
>>
>>Thank you for any suggestions.
>
>I prefer taking it all the way and having a dedicated log table -- date/time, user ID, table, transaction type (add/change/delete), record key, old value, new value. In every framework I have written there is a generic data update routine which talks to the log table. (Stole the idea originally from FoxExpress IIRC). Whether logging is desired can be specified at the table or form level. Once you have the data in a log table it's pretty easy to add a flexible query form to retrieve data based on table, user ID, record key, or whatever.

Mike,

Thank you for your input.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform