Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Alphabetic numbering system
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00174074
Message ID:
00174103
Views:
24
>>Do you have a copy of Codebook? I'm pretty sure there's a Base36 function in there that could be adapted to what you want.
>
>Yeah, I do. I have looked in the book, because I thought I remembered something like that, but I didn't find it. I also did a search of my codebook projects (using my nifty SearchString tool :-)) and came up with nothing. Do you remember what the function is called?
>
>
>>Otherwise just take the rightmost char, use asc() to convert it to a number, increment it, if goes over "Z" set it to A and increment the next digit to the left.
>
>I started laying out logic to do exactly this and it got pretty hairy. That's why I was looking for some other creatice solutions...
>
>Thanks for your help.

Check out the NewID() function in the database.

There is a stored procedure called IncrementBase62 (if memory serves... it's been a while).

One caveat on this method, though. It can be slow if you are doing imports or writing large amounts of records in a batch mode. I developed a custom version of it some time ago for a client that is much faster which I can share with you if you like.

Menachem
Menachem Bazian, CPA
President
BC Consulting Services, Inc.
973-773-7276
Menachem@BazianCentral.com
Previous
Reply
Map
View

Click here to load this message in the networking platform