Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Logging and Triggers
Wed, Sep 17 2008 8:37 AMPermanent Link

Stuart Kelly
What is the best way to log table changes?  

In our EPOS system we have a STOCK table, which holds all the stock levels for each
location.  Can I create a trigger to insert a record into another table with the changes?

For example, I run the query 'update stock set stock_quantity = stock_quantity + 1 where
id = '00005000' and branch = 1'.

We are currently using DBISAM but are considering migrating to ElevateDB
Wed, Sep 17 2008 8:58 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Stuart


With ElevateDB it would be pretty easy, with DBISAM not to difficult in you're using c/s and I'm not sure if its doable in fileserver.

Roy Lambert [Team Elevate]
Wed, Sep 17 2008 9:16 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Stuart,

<< What is the best way to log table changes?

In our EPOS system we have a STOCK table, which holds all the stock levels
for each ocation.  Can I create a trigger to insert a record into another
table with the changes? >>

Yes, you can do so in both DBISAM and ElevateDB.  The main difference
between the two is that DBISAM requires that you code the triggers in
compiled Delphi code, whereas ElevateDB implements triggers using SQL/PSM.
With DBISAM, you can still execute SQL in the Delphi code, but it has to be
done using TDBISAMQuery components.  You can see an example of an ElevateDB
trigger here:

http://www.elevatesoft.com/manual?action=mantopic&id=edb2sql&category=10&topic=151

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, Sep 25 2008 6:22 PMPermanent Link

"Stuart Kelly"

>
> Yes, you can do so in both DBISAM and ElevateDB.  The main difference
> between the two is that DBISAM requires that you code the triggers in
> compiled Delphi code, whereas ElevateDB implements triggers using
> SQL/PSM. With DBISAM, you can still execute SQL in the Delphi code,
> but it has to be done using TDBISAMQuery components.  
>

Thanks Tim and Rob for your quick responses.

Would the tigger affect the performace, if I was inserting and updating
stock records from serveral c/s clients at the same time?

Stuart
Thu, Sep 25 2008 8:21 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Stuart,

<< Would the tigger affect the performace, if I was inserting and updating
stock records from serveral c/s clients at the same time? >>

Sure, but it will most likely be pretty negligible.  You'll have to test out
the exact trigger to be sure that the performance is acceptable for you.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image