your database front-end

Server Outage Notice: dbFront.com will be transfering to a new Server on Friday 25th @ 7pm MST

Audit Values

Normally table triggers are the best way to deal with storing Audit information.  Table triggers are the most reliable solution since they can't easily be bypassed and so the audit information is trustworthy.

The main problem with using Table Triggers is that they don't have access to the currently connected dbFront user.

That is where the "Audit Value" field property comes in:  The "Audit Value" field property can be set to a constant value containing the following dynamically replaceable values:

  • %username%
  • {date()}
  • {datetime()}

dbFront will set all audit fields before any update or insert and will ensure that the user cannot change the audit values.

Capturing [Created] and [Updated]

If you want to record that name of the user that created the record and the user that updated the record, then you would set it up as follows:

  1. Setup two audit fields: AuditUserCreated and AuditUserUpdated.
  2. On the AuditUserUpdated set the AuditValue property in dbFront to %username%
  3. Create an INSERT TRIGGER on the table and have it copy the value from the AuditUserUpdated field to AuditUserCreated.
  4. Setup the AuditUserCreated field as read-only in dbFront.

Back to ...

Content you want the user to see goes here.
close