Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Auto inc skips
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
01274981
Message ID:
01275301
Vues:
23
>>>>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform