Hi All, I hope all is well. i have been trying to generate a unique identity code for each data record and i trying to use characters for example AAAA. AAAB, AAAC.
Now i move to the last record and the record appears in textbox1 as "AAAC" , but i would like to generate the next unique identity code character "AAAD" into another textbox2. how can i get about this.
Any help will be greatly appreciated. I using c sharp.
thanks
Loading

VulpesPosted Jun 30, 2011, 4:48 AM
Sam HobbsPosted Jul 13, 2011, 1:11 PM
Marvin kakuruPosted Jul 13, 2011, 7:31 AM
Fortunately tho vulpes has sent me code that has done just what i needed.
Thanks for your concern again.
Marvin kakuruPosted Jul 13, 2011, 7:11 AM
Sam HobbsPosted Jun 30, 2011, 9:13 PM
What set of characters do you need to use for the identity code? If you can use a set of 64 characters then you can use base 64. In other words if you can use the set of characters a-z in both lower case and upper case plus the digits 0-9 plus 2 other characters to generate an id then you can use base 64. To do that you just need an array of bytes with binary values to be converted.
Otherwise it depends on the set of characters. You could write a function that converts a 32-bit or 64-bit number to some other base, such as base 26 or base 52 or whatever.
So there are many options; the solution depends somewhat on the requirements. Can you be more specific?