Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
P.O. number generator
Message
De
17/11/1999 11:09:48
Jimmy Ditta
Twin City Electronics
Monroe, Louisiane, États-Unis
 
 
À
17/11/1999 10:54:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00291890
Message ID:
00291924
Vues:
20
My Tastrade sample is riddled with errors. Do I need my MSDN cd in the drive for it to work properly?



>>I need to write a little code that generates a number that equals the last number plus one each time a new record is appended, and writes it to a field in that record when the save button is pressed. It should cancel the number if an exit w/out save is executed.
>>
>
>
>Most of us use a strategy similar to this for generating primary keys. the key concept is to store the next available key in a table, and call a procedure that opens the table, locks the record, increments by one, and returns the value. Check out the Tastrade sample that ships with VFP for an idea on how to set this up. (Look in the stored procedures for the database).
>
>YOu would just need to throw in some additional logic that resets the value at the beginning of the year.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform