
JCN - KEEPING TRACKS OF ALL CHANGES TO RECORDS IN AN ACCESS DATABASE
I like to keep my audit data in separate tables.
I use two schemes depending on needs:
#1) The simplist scheme for me is to write the name of the updated
field, the table name, the record's key, old/new field values, userID,
and timestamp to a single audit table that serves all production
tables.
#2) A more comprehensive and resource intensive method is to make a
second "AuditHistory" table for every table in the database and copy a
snapshot of each record's "old" state into the table before updating
it with a change. This leaves more room for customized reporting
later. Not always practical for high-activity databases.
-----------------------------------
Quote:
>The scenario:
>All changes made by the operator to the database through bound controls
>through a datacontrol should be duly authorised, printed and have the
>possibility to revert to the initial data.
>Solution applied:
>Temporary tables are used. As soon a record is edited or deleted, a copy
>of the original record is made and the new record is also inserted in the
>temporary table. A flag with 0-Normal, 1-New, 2-Edited, 3-Deleted is
>maintained.
>Problems:
>(1) Do you have a better solution?
>(2) VB keeps a copy of the original data of the record being edited in its
>"copy buffer". Anyone knows how to copy this copy buffer to a table?
>(3) Another issue...Every one says that the best way to manipulate
>databases is to mix bound and unbound methods. How to achieve this?
>J C NEERUNJUN
-----------------------------
Support the anti-Spam amendment
Join at http://www.cauce.org/