Last post Apr 25, 2012 02:31 AM by Mikesdotnetting
Apr 24, 2012 06:37 PM|QaisBokhari|LINK
I have created an application in ASP.NET (C#) VS2010. The DB for this application is a shared DB which is shared between two more applications (One desktop and one on web). The DB is in the form of .DBF files. Now the help which i need
"When my application access any any file from DB folder and let say my user has made some changes in some of the records.Now on saving that records back to file i want to know that either these records have been modified by other applications
too or NOT? Because based on this i will perform different actions."
So, Please help me in this regard. Thanks
Apr 25, 2012 02:31 AM|Mikesdotnetting|LINK
Keep a record of all of the original values of the row that is about to be updated when you query the row for display on your web form. Add them all to the WHERE clause in your update statement. If any of the values have been changed while the user was staring
at the page, the UPDATE statement will return 0 rows affected when you execute it.
You can see this approach being used by the
SqlDataSource control if you choose the Optimisitic Concurrency option.