Subject 2 identical numbers from the same generator ?
Author Duilio Foschi
I wrote an invoice application.

2 PCs print invoices at the same time.

The invoice number is given by the following stored procedure

CREATE PROCEDURE NewFAT
RETURNS
(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 something
weird with the program (that allows an invoice to be reprinted, for instance).

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 ?

TIA

Duilio Foschi