Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
New Number
Message
De
20/11/2000 15:31:35
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
 
 
À
20/11/2000 13:52:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00443749
Message ID:
00443824
Vues:
11
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform