Hi, I am using asp.net with SQL2008 facing a concurrent user issue, if 2 users launches the application and clicks save then it is allowing to save the record twice. I need to avoid saving duplicate record. How can i acheive this?
1 thing i thought of taking Modifiedat value at the time of launching and comparing this value with database record if it differs then i will display message to 2nd user. Now the problem is we have migrated records which has same data of modifiedat.

Can any one let us know the best way to handle concurrency issue.
Your help is much appreciated.
-Mani

Thanks for your reply, Nice option but i have a query where both Users launches application @SAMETIME and clicks SAVE @SAMETIME, In this case 2 records will be persisted in database though this is rare scenario but still we need to address this as a matter of maintaining correct data. Not sure how this can be addressed.
Awaiting a response.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.