Subject Re: [IBO] insertSQL Help please
Author Helen Borrie
At 11:48 PM 8/03/2004 +0000, you wrote:
>Thanks Helen,
>
>but when I use New.IDLOC is NOT NULL
>I get an error;
>Validation Error for Column IDLOC, value ****null*****
>
>is there something else to set? I have generatorlinks
>IDLOC=GEN_LOCATIONS_IDLOC
>
>Daniel

Errrrk!!! sorry, typo in my example.

create trigger for yourtable active before insert position 0
as
begin
if (new.idloc is null) then
new.idloc = gen_id(gen_locations_idloc, 1);
end

Sorry for that.

Helen

>
> > Your trigger needs to be
> > if (new.ID is not null) then <==========================
> > new.ID = gen_ID (your_generator, 1);
> >