Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
To store every record change or not?
Message
From
21/03/2011 09:37:45
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01504208
Message ID:
01504346
Views:
66
>>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.

We have often made corrections directly through a BROWSE command, or something similar. Your users will probably not have access to it, but it is quite possible someone has a copy of Visual FoxPro and tries to fool around with the data.
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
Next
Reply
Map
View

Click here to load this message in the networking platform