Subject Re: Res: Re: [IBO] (unknown)
Author Lester Caine
Giovani - Terra wrote:

> Cod Name Description
>
> 1 Test This is a test
> 2 Test This is a test

> Here is my trigger:

> CREATE TRIGGER POSICAOTRIGGER1 FOR TB001_POSICAO BEFORE INSERT POSITION 0 AS
> BEGIN
> NEW.TB001_CODIGO_POSICAO = GEN_ID(GENERATOR_POSICAO,1);
> END

CREATE TRIGGER "tiki_base_content_trig" FOR "tiki_base_content"
BEFORE INSERT AS
BEGIN
IF ( NEW."contentId" IS NULL OR NEW."contentId" = 0 ) THEN
NEW."contentId" = GEN_ID("tiki_base_content_sequ", 1);
END

NOTE the extra line :)

--
Lester Caine
-----------------------------
L.S.Caine Electronic Services