Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating a code sequence
Message
From
03/09/2005 11:50:36
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
02/09/2005 19:13:09
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01046401
Message ID:
01046554
Views:
27
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
Map
View

Click here to load this message in the networking platform