Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Abstract Classes
Message
De
31/03/1997 15:47:33
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00026135
Message ID:
00026306
Vues:
35
>>I am happy to take your advice. What I am doing now is generating the number and , in a DO WHILE loop, SEEKing it and re-generating it until !FOUND(). If I put the primary key in a table, how do I generate it? By just adding 1 to its existing value? In a busy network, am I liable to face contention problems?
>>
>You would have to have a very busy network (100,000 new key's per minute to get problems)
>
>Each record represents a table. Just add 1 to the value in the field and replace the field. Then use the value that was there before you added one to input the primary key. The time delay is between reading the value of the field and replacing it with one more (fraction of a millisecond). Doubt you would have problems but an error routine to capture violations in the primary key error could send back to get new key to fix this.

Todd:

Thanks a lot--will implement your method immediately.

John
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform