New row creation on server from different clients RRS feed

  • General discussion

  • I have an access table called SBTran. Apart from several other fields,the table has an Invoice Number field.At present my application runs in single user mode and a form accesses the table to create a new row and after creation of the new row,I find the previous max value of the Invoice Number column and update the new row's invoice number value by adding 1 to the max value. However,now since I want to add more than one client using and saving to the same table,I am having some issues regarding allotment of the Invoice Number since it is possible that while I read the max value of the column,at the same moment another row may be added by another client,in which cases,the max value of the invoice number may be incorrect and not in correct order of creation. Hence,is there a way to ensure that when one client is accessing the table to create the row and accessing the max value,the other client request both for row creation and max value reading can be suppressed/delayed.
    Sunday, September 3, 2017 5:59 AM