Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Where to start?
Wed, Jul 18 2018 12:39 AMPermanent Link

Ian Branch

Avatar

Hi Team,
   I am considering hiving off some actions to the Server.

   For example, att I have a Delphi routine that when a field is changed in the JobTickets table, lets say JobStatus, it
writes the change to a Changes Log table in the form of..

   DateTime - TimeStamp of the event,
   User (VarChar(10) - e.g. ABC123),
   Action (SmallInt - 0=Add, 1=Edit & 2=Delete),
   TableName (VarChar(20) - e.g. JobTickets),
   KeyValue for the Table (VarChar(50) - for JobTickets it is the JobNo); and
   Changes (CLOB - "Field Job Status was changed from value AR to value UR").

   Where would I best put this and what would it look like?

Regards & TIA,
Ian
Wed, Jul 18 2018 4:06 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Ian


I'd use an after update/after insert  trigger pair for it. You need both because an update and insert are different. Your biggest problem (I guess) will be to determine the changes. You can use NEWROW and OLDROW to determine that.

If you have problems converting your Delphi code into a trigger drop me a copy and I'll see what I can do.

Roy Lambert
Wed, Jul 18 2018 5:40 AMPermanent Link

Ian Branch

Avatar

Thanks Roy.  
   I'll have a look/go at Triggers.
Regards,
Ian
Image