Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Disabling a trigger
Fri, Jul 24 2009 9:18 PMPermanent Link

Jeff Dunlop
Can anyone think of a way to disable a trigger short of altering it or dropping
it?
Sat, Jul 25 2009 3:46 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Jeff


Yup.  This is what I do

BEGIN
DECLARE ShortName VARCHAR;
DECLARE LongName VARCHAR;
DECLARE LogLevel VARCHAR;
DECLARE Logging SENSITIVE CURSOR FOR LogTbl;
DECLARE Naming SENSITIVE CURSOR FOR Names;
DECLARE Config SENSITIVE CURSOR FOR ConfigParams;
DECLARE BatchNo GUID;

PREPARE ConfigParams FROM 'SELECT CAST(_ParamData AS VARCHAR(5) ) AS Level FROM Config WHERE _ID = ''alCompanies''';

OPEN Config;
FETCH FROM Config(Level) INTO LogLevel;

IF LogLevel <> 'None' THEN


ie hold a flag in a configuration table and then get that and test it to decide what to do. In this case the flag can be None, Field or Table and indicates wether or not I'll log changes to the table and if so at what level of detail

Roy Lambert [Team Elevate]
Image