Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
New Number
Message
From
20/11/2000 15:31:35
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
 
 
To
20/11/2000 13:52:46
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00443749
Message ID:
00443824
Views:
12
Tyler,

Check out the stored procedure NextID in Tastrade.

Your method will cause duplicate values if 2 users hit it at the same time. You would need a PoolIDs table with one record (containing the counter) for each type of pool. You need to seek in it to see if the Pool is there, if not add the Pool and start the counter with 1.

In addition to the TasTrade example, Craig Berntson has a nice paper and routine about this on his website.


>I have a table that has pool, hand and number fields. If the user wants to add a new record, I check the table for the pool that the user wants to add a record for. If it isn't in the table, I give that record a number of 1. If it is I want to increment the last number for that pool by one. So there would be multiple records with the value of 1 or any other number for that matter. I can't think of a way to do this. Any help would be appreciated.Thanks,
>
>Tyler
Previous
Reply
Map
View

Click here to load this message in the networking platform