Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IS SYS(2015) really unique?
Message
 
À
16/03/2003 20:22:03
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00766401
Message ID:
00766407
Vues:
23
GUID as other disadvantage, it is big, it's a data of it's own and indexing is not sequenced compare to SYS(2015).

If you open a SCX and VCX that's what VFP itself uses for PK




>>Can anybody certify that the SYS(2015) function is generating unique ID. I plan to use this as a primary key in a big system and I want to be sure it won't generate duplicate...
>
>At least, I never heard of anybody trying to use it as a PK.
>
>Let's see some solutions other people use for PKs.
>
>How big is your system? If there are several computers connected over a single network, you might consider storing the next PK value in a table. (Integer; 4 bytes.)
>
>For disconnected systems, some people use GUID. This one is guaranteed to be unique for machines that have network cards, and very unlikely to have duplicates for those that don't. (16 bytes.)
>
>Another option is to assign an ID to each user (machine), and combine it with the first solution I presented. (6 bytes, if you use bintoc(User_id, 2) + bintoc(serialnumber(...))).
>
>HTH,
>
>Hilmar.
Luc Nadeau
lnadeau@neova.ca

"the theory, it is when all is known and that nothing works. The practice, it is when all works and that nobody knows why." - Albert Einstein (Nobel of physique 1921)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform