>>>>Why does an auto increment field sometimes skip a number? It seems to work properly when adding a series of records while in browse append mode but after exiting and coming back it will skip the next number and increment the first record by 2. Is this normal?
>>>
>>>From VFP help: "Visual FoxPro does not manage gaps in generated sequences. Gaps can be caused by reverting an appended or inserted record or by failing to update the base table and so on. In all cases, the unused value is lost, and the next generated value remains the same as if the append or insert operation succeeded".
>>
>>Gaps occur in normal scenarios, but we have a case with duplicate autoinc keys in one of our apps. This was more a test for autoinc, and I will probably revert to assigning the key from our key registry. Do you know when you'd get duplicate keys with autoinc?
>
>Do you know how did you manage to create the duplicate keys?
That was my question.
I know we've got autoinc duplicates, but I could not re-produce it in test code.
Doru