Using Triggers to backup records

LSN

Member
Hi list!

I have a table "A" that has the same PK that table "B". I built one trigger (JDE trigger on Table Event Rules of table “A”) to delete the “B” record when a “A” record is deleted.
In order to have a backup, I created a table "C" that has the same structure of table "B" plus an ID column. I built a trigger on table "B" (before record is deleted) to insert the deleted record on table "C".
The trigger on table "A" is working fine. The "B" records are correctly deleted but the second trigger is not making a backup on table "C".
In JDE.LOG there are the follow errors:

3176/3208 WRK:Starting jdeCallObject Tue Apr 08 18:02:02.010000 Jdb_trig.c382
JDB9900886 - Fallback Trigger Library JDBTRIG not loaded.

3176/3208 WRK:Starting jdeCallObject Tue Apr 08 18:02:02.010001 Jdb_trig.c470
JDB9900340 - Failed to Get Proc address for _F0411_DELETEBEFORE@12

These error are showed to the 2 triggers ("A" and "B") but the first one works fine.
Does anyone know if there is some restriction like "one trigger must be invoked by an Application or an UBE"? In my case, I am invoking the second one through a trigger.
I'd like to know if someone's already make a table backup without use neither audit trail nor database triggers.

Thanks a lot

EnterpriseOne B9, AS400 and DB2.
 
I know this isn't the ideal solution, but what about just reading B and creating C in the A table trigger? I know, you'll have to create a lot of variables.

Ben again,
 
Brian,

Thanks by your suggestion.
If I will not find a way to use the triggers, it's possible I use it.

Best regards
 
I personally found the Table ER Triggers unreliable in deleting and inserting records
confused.gif
, therefore I use DB Triggers for these operations.
If all I want is to launch a batch job, or send an eMail, no problem; I'll go with ER Triggers.
wink.gif

Warm regards,
 
Back
Top