Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
To store every record change or not?
Message
 
 
À
20/03/2011 12:23:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01504208
Message ID:
01504236
Vues:
72
>I am now implementing in my base BIZ class saving to audit trail table for all transactions
>
>One thing (and admittedly, I'm so far removed from FoxPro that I don't even remember if Fox databases have triggers)....if you can do this in the database with triggers, you're better off.
>
>Logging should be a function of the database, not the application. It may seem like a good idea to implement logging in your application code - but any data changes that occur outside your code won't get logged. Though people want to say otherwise, the truth is that changes occur outside the application.
>
>That's the beauty of triggers or even Change Data Capture in SQL 2008 - you put them in the database and they're like "Big Brother" - they see everything.
>
>But if Fox doesn't have DB triggers, then you either have to put the logic in your application code, or look for a 3rd party solution, or maybe someone else who is working with Fox has another idea.....

My application has to work on either SQL Server or VFP database. And the simple way I found to log the changes is via the base BIZ class. All my BIZ classes are based on this class and the logging (so far in testing) works very well. I realize your point about data changes outside the application. But at this point I can't see this possibility or if it exists it is very remote.
"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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform