Subject Re: 2 identical numbers from the same generator ?
Author csswa
Duilio, I very much doubt the problem arises from a generator issuing
the same value to your stored proc. I'm sure a generator bug like
this would have been exposed in the many years and billions of
generator values that have been produced by apps around the world.
(Of course, this is ignoring the possibility that a bug has been
introduced in a recent build.)

I would begin looking at:

1) what you are doing with the result value in your app from the
moment you code receives it from the SP;
2) how your invoice is getting the invoice number - is this a glitch
in your select logic?
3) following from above, confirming that a duplicate generator value
has indeed been posted to the DB; if not then it must be a glitch in
the invoicing/printing code.

Andrew Ferguson
-- If truth is stranger than fiction, where are the flying monkeys?

--- In ib-support@y..., Duilio Foschi <dedalus@y...> wrote:
> I wrote an invoice application.
> 2 PCs print invoices at the same time.
> The invoice number is given by the following stored procedure
> (result integer)
> as
> begin
> result=GEN_ID(FAT_GEN, 1);
> end
> In some infrequent cases 2 different invoices printed by the 2 PCs
come out
> with the same invoice number.
> To be honest, it never happened in front of me.
> I am just shown 2 invoices with the numbers corrected by hand.
> I could not test fully the possibility that the 2 operators do
> weird with the program (that allows an invoice to be reprinted, for
> But before I start a thorough investigation, the question is : is
there the
> least possibility (or a known bug) that allows a generator to
release the
> same number to 2 different transactions ?
> Duilio Foschi