NEXT just gets the next autonumber for that column, as if you had inserted a 
row, except no row is actually inserted.
The number in the table is meaningless, to avoid confusion just set it to zero.

Dennis McGrath
Software Developer
QMI Security Solutions
1661 Glenlake Ave
Itasca IL 60143
630-980-8461
[email protected]
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Les Stark
Sent: Wednesday, June 26, 2013 2:29 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Assigning Invoice Numbers and Duplicate Numbers

Thanks for the feedback.  The (NEXT(,...,...)) function seems to be my 
answer.

I think my duplicate invoice numbers were happening when a slow network 
connection was failing to update the single column in a single row where 
my invoice number is stored.  Before it could update someone on another 
connection was retrieving the same number for their invoice.
I needed a system that did not depend of an UPDATE command to set the 
next number.

If I use the NEXT command, no matter who hits the invoice number it will 
always assign the next number.

What I don't understand is.... The invoice number column that is set to 
autonumber and that is being polled for the NEXT invoice number is not 
updated and always shows the starting number!  It seems to not matter if 
you disconnect, drop rbase, upon restart it will assign the correct next 
number even though the field shows the original starting number.   It 
must be storing the next autonumber in the database... not in memory.
I can use this but it feels strange, not seeing, what the next number 
is.  I can update another column to store the current next number, but 
to update the autonumber column would create the same duplicate invoice 
number problems when a station was slow to update.


Reply via email to