| View previous topic :: View next topic |
| Author |
Message |
mpele General User

Joined: 11 Jan 2006 Posts: 13 Location: Serbia
|
Posted: Sat Feb 04, 2006 1:51 am Post subject: Tracking changes |
|
|
I have made database and form based upon it. That works fine but I want to track changes made in records. I would like to save in special table information when the changes were made and what is old and what is the new value.
How could I do that? Where should I put trigger and how could I find old and new value of the field? |
|
| Back to top |
|
 |
DrewJensen Super User


Joined: 06 Jul 2005 Posts: 2616 Location: Cumberland, MD
|
Posted: Sat Feb 04, 2006 11:05 pm Post subject: |
|
|
HSQLDB, the database engine used by a default Base database allows you to create triggers. These triggers implement a defined interface and must be written in Jave. The HSQLDB documentation includes an example trigger that includes the code to to create an audit trail. You can find information on this at the http://hsqldb.org
One thing to keep in mind is that a default Base database does not support user accounts at the database engine. So every user will be logged on as 'SA'. If you want to track users then you will need to create your own user table, and validate your own logon. Then pass this information to your tirgger, as the built in function USER will not be of use to you for this.
Drew _________________ Blog - http://baseanswers.spaces.live.com/ |
|
| Back to top |
|
 |
tcamdg Power User

Joined: 30 Oct 2011 Posts: 51
|
Posted: Wed Nov 02, 2011 11:53 am Post subject: Example or Tutorial |
|
|
Is there a concrete example or tutorial someone could point to for making a simple audit trigger?
I tried looking through the HSQLDB docs, but couldn't make heads or tails or any audit trigger example... |
|
| Back to top |
|
 |
|