Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Generating Consecutive Numbers
Message
De
17/03/2010 14:12:13
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
 
À
17/03/2010 13:06:41
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01455132
Message ID:
01455158
Vues:
63
>Hi,
>
>how do I generate consecutive numbers (for use as a customer number for example)? Is there anything in the framework that achieves this? I found reference to a function that autoincrements values, but it appears to b eonly on Primary Keys, this field is a candidate key.

I used to have a foxpro method that did that. Oh wait, it was a Open Access method. That goes back a few years. It would be pretty easy to do it Frank if you wanted to I could dig up some old code. The one I did was used to create Permit numbers where I didn't want to skip any numbers like so many of them do if an order is canceled. I wrote my own that didn't skip. The complication on your situation is going to be since you also allow the user to enter what they want is you will have to generate your next valid number and also verify it doesn't already exist..

I haven't heard back yet about if the framework has a way to hook into the autoincrement and at some point I will poke around to see if it is possible. I suspect it is a mechanism of the dataset stuff.

Let me know if you want any of my old code that would help with making your own method.
Tim
Timothy Bryan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform