Make sure you are not using any buffering on the table and that you lock the record while incrementing. You may want to look at the Primary Key code on my web site for ideas.
>I have written an application which uses many different forms. One part of the application adds a record into a table, and assigns that record a 'serial number'. The last serial number used is held in a separate table called serialno. When the application adds a record, it adds 1 to the serial number in store (ie serialno.nlastSN = serialno.nlastSN + 1).
>
>This is a multiuser application. For some reason, all of a sudden, when one of the other users enters a record, the application picks up serialno.nlastSN about three numbers back. Is this something to do with data sessions? How do I check? It seems to happen kinda randomly.....
>
>CM
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer