Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Incrementing Alpha ID's
Message
De
01/05/2007 14:00:40
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01212864
Message ID:
01221608
Vues:
10
>This didn't work as I thought it would. It leaves the program too early and doesn't finish the job.

>If I have an alpha ID that is 5 characters long always, and I want to increment say, from "aaaag" to the next ALPHA ID, it would naturally be the following: "aaaah", but the below doesn't give me that; it actually returns what I started with.

Take a look at the code that I replied with earlier in this thread -- it does exactly what you expect above (but it uses uppercase only -- you could adopt for lower case; just change the ASCII range for characters. It also respects the field length -- keeps at 5 chars, i.e. 00001, 00002, .... 000AB, 000AC, etc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform