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();
Best Regards,
Amy Peng
Please mark the replies as answers if they help or unmark if not.
Feedback to us
Harman Bajaj
Member
85 Points
68 Posts
Registration
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 ?
SohailShaikh
Contributor
6281 Points
1188 Posts
Re: Registration
Dec 15, 2012 08:44 AM|LINK
if you want to get this auto generate id then please use
Sohail Shaikh
Amy Peng - M...
Star
11777 Points
1099 Posts
Microsoft
Re: Registration
Dec 20, 2012 12:59 AM|LINK
Hi Harman,
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:
Best Regards,
Amy Peng
Feedback to us
Develop and promote your apps in Windows Store