Mike Yearwood
Toronto, Ontario, Canada
Information générale
Catégorie:
Codage, syntaxe et commandes
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement