TriggersI added this to the start of my triggers....

set var tv_RunTrig text
if tv_RunTrig is null then
set var tv_RunTrig text='Y'
endif

if tv_RunTrig ='Y' then
---run the trigger code
clear var tv_RunTrig
endif

then if I'm doing updates that I don't want the trig to run before updating I 
set the var tv_RunTrig='N'
and clear it after I'm done.


  ----- Original Message ----- 
  From: John Engwer 
  To: RBASE-L Mailing List 
  Sent: Wednesday, August 13, 2008 2:57 PM
  Subject: [RBASE-L] - Triggers


  I use a lot of triggers in my applications and sometimes I would like to 
suppress the trigger for certain processes.  Such as the audit trigger when 
updating a large table.  Because I usually perform these procedures at night 
when no one else is using the database, I currently drop the trigger when I 
start the routine and then add it back at the end of the procedure.  It works 
fine except that the trigger is then not active for other users that may log 
onto the system unexpectedly.

  I think that I may program a switch into the procedure to bypass the code in 
the trigger procedure but I thought that I would ask how other developers 
handle this issue.  I tried using the ABORT TRIGGER in the procedure but it did 
not suppress the trigger.

  Any input will be appreciated.

  John

Reply via email to