OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Tracking changes

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
mpele
General User
General User


Joined: 11 Jan 2006
Posts: 13
Location: Serbia

PostPosted: Sat Feb 04, 2006 1:51 am    Post subject: Tracking changes Reply with quote

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
View user's profile Send private message
DrewJensen
Super User
Super User


Joined: 06 Jul 2005
Posts: 2616
Location: Cumberland, MD

PostPosted: Sat Feb 04, 2006 11:05 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
tcamdg
Power User
Power User


Joined: 30 Oct 2011
Posts: 51

PostPosted: Wed Nov 02, 2011 11:53 am    Post subject: Example or Tutorial Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group