Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 20, 2012 12:59 AM by Amy Peng - MSFT
Dec 15, 2012 07:26 AM|LINK
I have made an applicaition which is registration. In this when more than one user clicks at the same time then in the database.
2 ids generate with same number.
Can any one tell me how can i solve this. and does Applications.Lock() before obj.Registration() and Applications.UnLock()
after registration works ?
Dec 15, 2012 08:44 AM|LINK
if you want to get this auto generate id then please use
both are return last generte id with no confilct
Dec 20, 2012 12:59 AM|LINK
You can try to use the GUID(Globally Unique Identifier ) which can be used to uniquely identify something. For example when we store users or products in our database and we want somehow uniquely identify each row in the database. A common approach is to
create a autoincrementing integer, another way would be to create a GUID for our products.
You can do as the below:
Guid userID = Guid.NewGuid();