I have an accounting application, where the Debit Note/Credit Note/Invoice numbers are taken from a table. When the user starts makeing the Debit Note a reference number from the the table lastno.dbf is alloted as Debit Note number and when he saves the Debit Note lasno.dbf field is incremented by 1. This works fine only when one user is working in the system. Now a situation has come where more than one users have to work simultaneously. There is a time gap of minimum 2 minutes for taking a new number and saving the documents - if the user gets a phone call in between, cannot say when he will save the document. During this time, if another user try to make a debit note he also makes a debit note with the same reference number.
There are a lot of experienced foxite members who develop applications for multiuser environment. Could somebody explain how such situation is handled perfectly.
Thanks for help.
Benny