Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating a code sequence
Message
De
03/09/2005 11:50:36
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
02/09/2005 19:13:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01046401
Message ID:
01046554
Vues:
13
Hi Beth

Your approach has two problems, one it can result in two people trying to save the same key value and two, you're using MAX() to calculate the value. Without an index on the keyfield, that will take enormous amounts of time. Even with the index it will still take much longer than the various newid functions. Another approach may be to generate a GUID.

>I have not run into repeated IDs in any of my apps, but because you are, you should really look at the second table method and use it. It is a better way of doing it, especially if you ever have to upgrade from tables to a true client/server. I know that my way will not work in a true client/server setup. I am trying to teach myself the client/server way and hope to redo most of my programs, eventually, to client/server.
>
>
>>Beth
>>There will be 5 users sharing the table
>>I think there will be no risk of a repeated code, will it ?
>>
>>Moises
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform