Mike Yearwood
Toronto, Ontario, Canada
General information
Category:
Coding, syntax & commands
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
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only