Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unique number
Message
From
06/07/1998 09:49:09
Larry Long
ProgRes (Programming Resources)
Georgia, United States
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00113894
Message ID:
00114513
Views:
24
>>Granted, so to ensure that a duplicate does not exist, you can add a machine_id to the string, then search the table to verify that the key has not been used.
>
>Searching a table only discovers data that has been saved to the network, not data still in buffers on individual machines, and the machine_id adds a long string to the ID number that is difficult to read and report.
>
>Why go through all this effort when you can use a lookup table? Just lock the appropriate record, increment the value and unlock the record for someone else to use. Unique, you can use VERY large numbers (I think it's 2 billion) if you use integer-type, and easy to handle.
>
>Barbara
It really depends on how the application is going to be designed to be used. I am programming all of my keys to be able to be used as distributed databases (remote and/or offline views), where access to a reference key table may not be available. I suppose that eventually, I may start using the windows "CSLID" function to generate the unique keys, if I run into the chance to create a globally distributed program (Please excuse me while I wipe off my chin!)
//:^)
L.A.Long
ProgRes
lalong1@charter.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform