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