Subject Re: [IBO] insertSQL Help please
Author stanw1950
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...> wrote:
> At 04:30 PM 8/03/2004 -0400, you wrote:
> >Thanks,
> >
> >I do not see 2 blank rows, only the generator gets inc by 2. I have
> >generatorlinks set, would that cause it? if generatorlinks is set
I do
> >not need a trigger?
>
> Your trigger needs to be
> if (new.ID is not null) then
> new.ID = gen_ID (your_generator, 1);
>
> The null test is essential if you are using generatorlinks, to
avoid firing
> the trigger when you already have the value.
>
> Helen


Helen,

Why even use a trigger if you are using generatorlinks for all your
inserts? Or, why use generatorlinks if you are using a trigger? It
seems to me that you should only use one or the other, but not both,
or am I missing something?

Stan Walker