Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Question about sys(2015)
Message
 
À
23/12/2000 09:07:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00456573
Message ID:
00456577
Vues:
30
Hi David

Both functions --- SYS(3) and SYS(2015) --- are based on the system time on the computer they are called. Allthough SYS(2015) is better than SYS(3) when delivering unique values, it's still a risk in a multiuser environment.



Also, keep in mind that two workstations calling one of these functions at the same time will get the same value. They're not suited to generating unique IDs.

<...>

A commonly used practice to generate primary integer keys is the NEWID() function. A sample of that you can find in the Tastrade Application, that's delivered with VFP. Another possibility is to use real GUID's (that are those "funny" strings you can see in the registry :-) ) If you are interested in how to get such a GUID in VFP take a look at

http://support.microsoft.com/support/kb/articles/Q269/3/87.asp

HTH
Markus
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform