Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Anyone written code to replace SYS(2015)?
Message
De
27/09/2006 16:12:36
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01157093
Message ID:
01157650
Vues:
31
>Hi again, Hilmar, and thanks for the reply.
>
>>Brief summary - and please note that I am no expert on this: GUID is a Windows
>>function (API) that gives you a 16-byte value, unique in the World (if the computer
>>has a network card), and very likely unique (if it doesn't).
>
>Hmmm. Sounds like IPv6 or something.

No; the MAC address (serial number of the network card) is a 48-bit value; this is incorporated into a 128-bit (16 byte) value, with this special function. It is totally unrelated to IP version 4 or 6, although the length happens to be the same as with IPv6.

>Would this be a good thing or a bad thing? (Shrug.) The larger the value, the better
>the possibility of being unique. OTOH, I'd imagine that doing something like:
>"No, Dave. The ID of that record is '_$L1B8ACF3LLJ133Z'" would be kinda obfuscated
>and cryptic when discussing this stuff over the phone :^).

The keys would used, most of the time, for internal use, IMO. Many programmers (but by no means all) agree that it is convenient to use, as the primary key, a value that is not seen by the user, thus freeing you of the need to change the primary key (and the corresponding foreign keys in other tables), when the user decides to change the coding system (client codes, city codes, whatever).
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform