Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unique Record
Message
De
07/08/2006 09:34:07
Mike Yearwood
Toronto, Ontario, Canada
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01143354
Message ID:
01143432
Vues:
9
>>Naomi,
>>
>>>I think it's very hard to achieve what you're trying to achieve and probably not worth the effort. Your Order number should be a unique key and user should not even see it. If the later is the case, then it doesn't matter if some numbers are skipped.
>>
>>Sorry, but I must disagree with you on this one. Many systems use a "meaningful" Order # for printing on the sales order / invoice and for lookups by the number that the customer sees. If I order something from a company, I want to have a reference number that the system's user and I as the customer know about.
>>
>>This, however, does not have to be used as the primary key, which can itself be a "meaningless" auto-assigned number that the customer never sees. You are correct that it doesn't matter if numbers are skipped in the PK, but the customer's requirement in this case seems to be that they don't want skips in the sequence of meaningful order numbers.
>
>Hi David,
>
>Yes, I think I confused the two. In any case, I don't see a simple way to satisfy customer requirements...

It's quite easy. You generate the primary key (a guid) on the client/web server, not on the database server. You have the order number as auto incrementing. You save the record, and requery it using the generated primary key.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform