ASP.NET ChangeConflictException; "No row found or changed"

Posted on 2009-06-29
Last Modified: 2013-11-11
I cant resolve this error.  I'm using Linq to SQL and I can't get this to resolve.  I'm the only one touching this data so it's not a matter of more than one person hitting the data.
using System;

using System.Configuration;

using System.Data;

using System.Data.Linq;

using System.Linq;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.HtmlControls;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Xml.Linq;

using CPMS_DAL;

public partial class _Default : System.Web.UI.Page 


    protected void Page_Load(object sender, EventArgs e)


        CPMSDataContext db = new CPMSDataContext();

        tbl_Account Account = db.tbl_Accounts.Single(ua => ua.Company_Name == "Test_Company");

        ViewState["AcctID"] = Account.AcctID;

        ViewState["version"] = Account.version;

        ViewState["CreateDate"] = Account.CreateDate;



    protected void BtnUpdate_Click(object sender, EventArgs e)


        //Create an Account object and set the properties

        tbl_Account Account = new tbl_Account()


            Company_Name = "Testing_company",

            UpdateDate = DateTime.Now,

            UpdateByID = 55


        Account.AcctID = Convert.ToInt32(ViewState["AcctID"]);

        Account.version = (Binary)ViewState["Version"];

        Account.CreateDate = Convert.ToDateTime(ViewState["CreateDate"]);

        CPMSDataContext db = new CPMSDataContext();

        db.tbl_Accounts.Attach(Account, true);





Open in new window

Question by:Samantha1667

Expert Comment

Comment Utility
Which line r u encountering the error
LVL 15

Accepted Solution

NazoUK earned 50 total points
Comment Utility
Your casing on the version viewstate variables is different (version and Version), you're probably not getting anything returned when you fetch that variable.

Author Closing Comment

Comment Utility
Thank you very very much!

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK ( for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now