Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
To store every record change or not?
Message
From
20/03/2011 12:49:02
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01504208
Message ID:
01504239
Views:
68
>>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.

You might look into Adding a CRC32-field "verifying" the point that the record was updated via your app / bizlogic.
As a side benefit, checking on read you get a flag that something was done to your data right in your app.

OTOH if "trust" is that important, it is a hint to switch to a SQL backend ;-)

regards

thomas
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform