Subject | Re: [IBO] insertSQL Help please |
---|---|
Author | Helen Borrie |
Post date | 2004-03-09T00:11:43Z |
At 11:48 PM 8/03/2004 +0000, you wrote:
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
>Thanks Helen,Errrrk!!! sorry, typo in my example.
>
>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
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);
> >