That's what backups are for. Or, if you need things to be less likely to be corrupted, move all the data to SQL Server.
>That's more or less what I've been doing for God knows how many years, works like a charm.
>
>If the file containing the next invoice number (or last issues, however your logic works) is locked the program goes in to a loop waiting a half a second or so and and retries (up to a limit of course). The user is never aware there was a wait for the invoice number (or sales order, or po numbers, whatever) and they are always issued in sequence.
>
>That part of the process is almost bullet proof, never a problem. Problems arise when something happens to a transaction, such as an invoice, once stored. Occasionally every few years an invoice, or something else, gets corrupted and the user has a gap in the numbers that they are not used to seeing. This is usually because of a communications failure or workstation crash at the wrong time.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer