Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ID field
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01170010
Message ID:
01170029
Vues:
13
Vladimir,

Thanks for your response, but I was not talking about SQL Server. I was talking about VFP native tables (not even part of database -free tables) and the ability to autoincrement field without using autoinc field added in VFP8. As far as I know the only other reliable method is to use a separate table to hold the latest ID (one record per table with ID). The approach is described in Craig Bernston's website and I used it myself successfully.

Now I'm facing a situation when we're not using external table for IDs, but just taking the last ID from the table itself. I'm afraid there is no way to avoid possible duplicates, though with an immediate check we can minimize the risk. I don't know what to tell. That we should re-design the current approach?

>>Hi everybody,
>>
>>AFAIK there is no way in multi-user environment to have ID field incremented correctly without using extra table to keep the last ID (if we're not using autoincrement field). Using go bottom, grab the last number and start from there doesn't prevent two users from taking the same ID. Even if we put a check right after for the existance of ID.
>>
>>What do you think? Given only one table and no auto-increment is it possible to correctly auto-increment in multi-user environment?
>>
>>Thanks.
>Take a look at http://www.foxclub.ru/articles/index.php?id=46
>and
>Message # 1121163
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform