Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IS SYS(2015) really unique?
Message
De
16/03/2003 22:42:35
 
 
À
16/03/2003 22:18:21
Peter Easson
Catalina Trading
Sydney, Australie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00766401
Message ID:
00766421
Vues:
24
>Yes, must remember "Engage Brain before engaging mouth" :-)
>
>The only problem area with sys(2015) on a network is if the system clocks are not synchronised and then there is a v. small chance that duplicate UID's could be generated. I like your idea of the prefix. Because it always starts with an underscore, you could replace that with a chr() val which would give 255 unique workstations and also a means of logging 'who dun it'!

Yep,
that's an added bonus to id the user who dun it. We have > 300 users on some of our systems. So there is that limit. But two bytes should be sufficient for up to 65000 users if you were to do a one-one mapping algorithm from user id to 2 bytes.

BTW, we use a control table to allocate unique PKs and other things such as invoice numbers in our systems (as others have pointed out) We only use sys(2015) to generate unique local names for cursors and tables and suchlike.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform