Context submitchanges is not updating the database

One problem that I can't seem to resolve with the data context is how to update Entities based on POCO objects that didn't originate out of the Data Context.

This series of articles is the best I have found on explaining LINQ data mapping I have come across - very logical, clear and easy to understand.

I am using it as a basis to create my own model which includes an M: M relationship so I have declared an internal class along the lines of the Book Author class in the article.

Everything seems to work well until I call the Submit Changes method to update an M: M relationship at which point I get a SQLException 80131904 - Invalid Object Name.

You apply any number of updates, inserts or deletes.

That are then held as a unit of work, then once you've finished your changes you simply commit them to the database as a single action or roll all of the changes back, maintaining the integrity of your database.

Search for context submitchanges is not updating the database:

context submitchanges is not updating the database-76

For more information, see Customizing Insert, Update, and Delete Operations. foreach (Order ord in query) // Submit the changes to the database. Order ID = 11000 _ Select ord ' Execute the query, and change the column values ' you want to change.

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “context submitchanges is not updating the database”

  1. "He wasn't with his wife - he was with his mistress and he was buying her discount Swedish furniture." The guys often prank Murr by increasing the tip he writes on cheques at restaurants, so if he leaves they'll sneak a little 4 in there, and before you know it some lucky server is up.