Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Suggestions for random candidate key generation methodol
Message
From
12/05/2004 17:29:50
 
 
To
11/05/2004 10:41:50
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00902286
Message ID:
00903387
Views:
18
Tracy-

>http://accessadvisor.net/doc/03419

Interesting article. Though the complication my particular problem introduced wasn't so much how to generate a key, which is easy enough. The complication is generating a key randomly while making sure other users don't get the key generated whilst the first one is buffered in an edit. Ordinarily, I'd look first to use GUIDs, but since my key is limited all digits and not very long at that, it was a little less obvious how to solve it.

I did end up generating a table of keys in the range I needed, than randomly sorting the list--a twist on David and Sergey's suggestion. I used one digit as a check digit--Gregory's suggestion.

I'll probably consume the keys randomly, too, though that's probably overkill for this. I just don't want the casual bystander to be able to guess what a valid SN is.
Previous
Reply
Map
View

Click here to load this message in the networking platform