Sunday, May 1, 2011

Retrieve multiple results set

I have a Problem after I restive data from multiple result set I update the data and save it and its updated in Sql but when I retrieve it again its bring the old data what I can do?

From stackoverflow
  • You don't give many clues how you are doing this, and how you are doing the save (which might be important). However, a common gotcha here is using a local database file that is part of your project. If the project says "Copy Always", then every time you build it, the database is re-written from the unaltered state.

    If that isn't the problem - are you perhaps leaving a transaction open?

    (edit) Now that we've established that you are using LINQ-to-SQL; are you calling SubmitChanges()? It would also help to know whether you are using a single data-context, multiple data-contexts, or what? A data-context will only track changes in objects it created.

0 comments:

Post a Comment