Subject Re: [IBO] Disabling a trigger, Setting a Generator value
Author Lucas Franzen
Ed Dressel schrieb:
> 1) Is it possible to disable a trigger, or do I have to drop it?
> If the later (dropping it), how can I get the trigger to reinstate it
> after I am done with my update?

ALTER TRIGGER <triggername> [ACTIVE|INACTIVE]

Note:
Disabling a trigger for update purposes is nonsense (since you're
disabling it for ALL users!).
If you have to do it use a column in your table and let the trigger
execute if it's set to a certain value
(for example
CREATE TRIGGER ....
BEFORE UPDATE
as
begin
if ( NEW.MASS_UPDATE = '1' ) THEN
BEGIN
MASS_UPDATE = '0';
END
ELSE BEGIN
/* do what you normally do within your trigger ..
END
END

> 2) How can I set a generator's value?

SET GEENRATOR <GEN_NAME> TO <VALUE>

Luc.

P.S.:
This are not IBO specific questions.
I'd recommend you have a look at the firebird support groups and/or read
the IB/FB docs.