Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question about sys(2015)
Message
 
To
23/12/2000 09:07:17
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00456573
Message ID:
00456577
Views:
28
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
Previous
Reply
Map
View

Click here to load this message in the networking platform