G
Guest
I want to generate a primary key in ASP.Net through VB.Net code.Can someone
give some tips and ideas how to do that.What i am thinking is to:
1.Create an array of values(characters) from 0 to 9 and 'A' to 'Z'.
2.Then use a nested For loop to create various combinations.
3.Then checking whether these combinations exist in the field of the table
or not.
Can someone suggest a better way of doing that.Is it a good idea to create a
primary key in runtime as above stated.
What if i have to create a primary key for user ids for users from all over
the world(probably too huge or unlimited)?
give some tips and ideas how to do that.What i am thinking is to:
1.Create an array of values(characters) from 0 to 9 and 'A' to 'Z'.
2.Then use a nested For loop to create various combinations.
3.Then checking whether these combinations exist in the field of the table
or not.
Can someone suggest a better way of doing that.Is it a good idea to create a
primary key in runtime as above stated.
What if i have to create a primary key for user ids for users from all over
the world(probably too huge or unlimited)?