khurram

khurram

  • NA
  • 1
  • 0

Unique and Random number in Webapplication environment

Jan 10 2006 5:43 AM
HI i am working on an application in which i need to give fictitious names to the clients connected to a particular session of auctions. The names can repeat for the next session and different clients can get different fictitious names even if they were being repeated in the first session.
The names can be forexample
client1
client2 etc
if the identity colunm of sqlserver is used it will keep on incerementing the numbers and in a month or so the clients will be getting names like client333333 client33333333333333 etc. So what is required is some suitable name which can be repeated in different sessions but must be unique in one session. C# Random class does not guarantee the uniqueness(if i am right) especially in the web environment where everything is created and destroyed on the fly.
 
Any idea from anyone would be of great help.