Methoology for data changes being tracked

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to be compliant with law that keeps a history of changes to tables as
records are edited. What is the best way to do this ? I was thinking a SQL
trigger on each table that writes to another change table on update (seems a
bit much), or use an OnChange event when ADO.NET posts to track the changes.
Is there a better approach to what seems a standard problem these days ?
 
The only completely reliable way is to use the db triggers someone could
easily change the data in the db without going through your interface (or
someone could feasable modify your application to bypass the audit code).
That said, many people also use code level logging .. if are using something
like an object persistence framework (nhibernate etc) many have extension
points for things like logging. If youa re just using ADO and calling
inserts directly etc as opposed to a centralized framework I might lean
towards triggers as the code will get to be tough to maintain (as someone
could easily forget to put in an audit or miss an audit)

Cheers,

Greg Young
MVP - C#
http://geekswithblogs.net/gyoung
 
Back
Top