Subject Re: Generator Problem. Values = 2, 4, 6, 8, 10,...
Author mcrosman1957
Hi.

Yes, I am using IBDatset.
I have set the generator field of the IBDatase to the generator
PCOrc_Gen.

Thanks,

Marcelo
--- In ib-support@y..., "Alan McDonald" <alan@m...> wrote:
> IBDataset has a generetorfield where you declare the generator - it
will get
> a value, then you insert a null and the trigger gets a value
> are you sure you are not using IBdataset?
> -----Original Message-----
> From: mcrosman1957 [mailto:delphi7@b...]
> Sent: Saturday, 28 September 2002 9:59
> To: ib-support@y...
> Subject: [ib-support] Generator Problem. Values = 2, 4, 6, 8,
10,...
>
>
> Hi.
>
> I am using Delphi 6.0, Firebird 1.0.0.338
> and Interbase Express components: IBDataset, IBTransaction, IBSQL.
>
> I have created a generator with the statement:
>
> Create Generator PCOrc_Gen;
>
> And a trigger for this generator with the statements:
> =====================
> SET TERM #
> CREATE TRIGGER SET_NumReg_PCOrc FOR PLANCONORC
> Active Before INSERT Position 0 AS
> begin
> IF (new.NumReg IS NULL) then
> new.NumReg = gen_id(PCOrc_GEN,1);
> end #
> SET TERM ;#
> ========================
>
> I have noticed that every time a do a insert the values generated
for
> the NumReg primary key are 2, 4, 6, 8, 10,... and not 1, 2, 3, 4,
5,
> 6, 7, 8,...
>
> Why does it happen? How can I solve this problem?
>
> Thanks for any help.
>
> Marcelo.
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@e...
>
>
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
>
>
>
> [Non-text portions of this message have been removed]