Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
>>A new free table is being added to an application. It will be the child of a previously existing table.
>>
>>The parent table unique id is made up of three fields totaling 20 characters. I'm considering adding an auto incrementing integer to the parent table to serve as link to the child table but am afraid what may happen if somehow the id sequence gets out of control and skips ahead to the maximum integer (2^32 - 1), This is a totally critical table in the application.
>>
>>In the experience of those here, is this a realistic fear? I would appreciate comments.
>>
>>TIA,
>>
>>Alex
>
>In Visual FoxPro 6, I have used a default value (with a function that gets a value from a table), and values are skipped mainly under the following circumstance: the user adds a record, then decides not to save (and presses the "Undo" button in the form). In this case, the number was already used, and won't be assigned again.
>
>I suspect the situation would be the same with autoincrementing fields, but you can easily test that.
>
>I don't think that would be a serious problem; even if you use only one out of every 10 numbers - which I think is exaggerated, you won't skip that many - you can still have about 200 million records.
Thank you Hilmar.
Alex
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement