Hi
on this line dbContext.SubmitChanges(); i get error - System.Data.Linq.ChangeConflictException: 'Row not found or changed.'
protected void btnUpdate_Click(object sender, EventArgs e)
{
using (SampleDataContext dbContext = new SampleDataContext())
{
Employee objEmployee = dbContext.Employees.SingleOrDefault(x => x.EmployeeID == "ET001");
objEmployee.FirstName = "Harjeet";
dbContext.SubmitChanges();
}
}
Thanks
Muhammad Imran AnsariPosted Feb 22, 2022, 6:50 PM
You can check the data types for all fields in the O/R-Designer match the data types in your SQL table. For more information you can check the following link:
https://stackoverflow.com/questions/45045/what-can-i-do-to-resolve-a-row-not-found-or-changed-exception-in-linq-to-sql-o/83999