> >> Over the years of my experience with Fox and VFP, I used all kinds of 
> ways to
> >> generate primary keys, and in retrospect the best ever was 
> concatenating the machine
> >> name with the output of sys(2015).
> >>
> >
> > Wasn't it true at one time that SYS(2015) didn't guarantee uniqueness?
> > More like a "really really really good try" sort of thing?
>
>That's why I concatenate with the machine name. I guess if you are really 
>paranoid
>that a second instance of VFP could be running sys(2015) for the same 
>table in the
>exact same timeslice as the first process you could also concatenate the 
>process id.

Machine names are not guaranteed to be unique indefinitely; they are only 
guaranteed to be unique on a single domain at one point in time.

On my network I name machines for a department name plus a number. These 
names may be recycled among different machines and users as a department 
expands and contracts and machines are removed and replaced.

As I understand it, no GUID generator can truly "guarantee" unique IDs; 
there is only a very, very, very high probability that no two GUIDs 
generated will be the same. It's kind of like the very high but not 
absolute probability that existing tests can accurately distinguish DNA 
samples from different sources.

Very high probability that something won't happen <> impossible. Nor does 
probability == predictability. Something that is very improbable not only 
can happen, but it can happen several times in row. Someday somebody's 
going to get bitten by these GUID generators.

Unless they concatenate something guaranteed to be unique to the setting in 
which they are generated. A MAC number might be a better choice.

Ken Dibble
www.stic-cil.org


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to