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


VulpesRank #55 · 29.2K reputationPosted Jun 30, 2011, 12:48 AM EDT
Sam HobbsRank #107 · 20.5K reputationPosted Jun 30, 2011, 5:13 PM EDT
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?
Marvin kakuruRank #3,979 · 374 reputationPosted Jul 13, 2011, 3:11 AM EDT
Marvin kakuruRank #3,979 · 374 reputationPosted Jul 13, 2011, 3:31 AM EDT
Fortunately tho vulpes has sent me code that has done just what i needed.
Thanks for your concern again.
Sam HobbsRank #107 · 20.5K reputationPosted Jul 13, 2011, 9:11 AM EDT