Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Uniqueness of 'primary_key' is violated.
Message
De
21/09/2004 19:32:11
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
21/09/2004 18:57:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00939529
Message ID:
00944799
Vues:
27
>I think of a customer entered key, much as I would a first name. Good information, but not something you can rely on. Useful for searches, but not a guarentee to find what you are looking for. I use GUIDs for my pk's. Love them.

GUIDs of course solve the problem of creating PKs for computers which are not always connected. I was thinking about the following alternative, but never actually tried it: assign each branch office a different number, and create PKs like: bintoc(branchnum, 2) + bintoc(SerialNumber("TableName"))

... where SerialNumber() gets a sequential number from a special table.

This would use 6 bytes, instead of the 16 used by the GUID. Any opinions?
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