locked
Help relating to .DBF fies RRS feed

  • Question

  • User-1076112646 posted

    Hello Seniors,

                        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 is that

    "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

    Tuesday, April 24, 2012 6:37 PM

Answers

  • User-821857111 posted

    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.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, April 25, 2012 2:31 AM