Question Write an ABL program which captures the triggers of Customer table and stores it in a table "EventLog" (action,time,date,oldvalue,newvalue).

RealHeavyDude

Well-Known Member
Without providing detailed information on your requirements it is not possible to give a proper advice. There are many possible solultions if you want to create some form of audit. But which one is the one that suits you best depends.

Using 4GL procedures has one big disadvantage which disqualifies it for an audit trail: The audit data can be tampered with.

Nevertheless - if you really want to go down the 4GL route - then this might get you started:

Progress KB - Is it possible to audit database activity from the 4GL?
Progress KB - How to implement an AUDIT within the Progress DB and 4GL?
 

ForEachInvoiceDelete

Active Member
This reads like an interview question. Ill assume your customer table only has one field because i cant be bothered to write more code. Im also writing this in the most lazy way possible so that it compiles but you wont cut/paste.

Use it as a learning example.

W_Customer.p - filename! Enable the table trigger!

Code:
Trigger procedure for write of customer
new inserted old deleted.

create eventlog.
assign action = "TapDancing"
            datetime = now
            oldvalue = deleted.Thisismyonlyfieldonthistable
            newvalue = inserted.Thisismyonlyfieldonthistable.
 

ashishmorokar

New Member
Without providing detailed information on your requirements it is not possible to give a proper advice. There are many possible solultions if you want to create some form of audit. But which one is the one that suits you best depends.

Using 4GL procedures has one big disadvantage which disqualifies it for an audit trail: The audit data can be tampered with.

Nevertheless - if you really want to go down the 4GL route - then this might get you started:

Progress KB - Is it possible to audit database activity from the 4GL?
Progress KB - How to implement an AUDIT within the Progress DB and 4GL?
THANKS for u r valuable time for the knowledge and u r valuable time its help full to me
 

ashishmorokar

New Member
This reads like an interview question. Ill assume your customer table only has one field because i cant be bothered to write more code. Im also writing this in the most lazy way possible so that it compiles but you wont cut/paste.

Use it as a learning example.

W_Customer.p - filename! Enable the table trigger!

Code:
Trigger procedure for write of customer
new inserted old deleted.

create eventlog.
assign action = "TapDancing"
            datetime = now
            oldvalue = deleted.Thisismyonlyfieldonthistable
            newvalue = inserted.Thisismyonlyfieldonthistable.
Thanks sir for u r valuable time and clearing my concept thanks very much
 
Top