Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Auto inc skips
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
01274981
Message ID:
01275011
Views:
36
>>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?
Doru
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform