Concurrency violation: the UpdateCommand affected 0 of the expected 1 records.

csharp , datasets , Concurrency violation Malta
  • 4 years ago

    Hi All,

    I'm developing a blog using ASP.NET. I am connecting to the database using datasets. My problem is when I try to do update a particular row in the database.

    This is the Method that is giving me the concurrency error.

    internal void UpdateChanges(BlogDataSet.BlogDataTable data)
            {                     
                BlogTableAdapter blogTableAdapter = new BlogTableAdapter();
                blogTableAdapter.Update(data);
            }
    

    The Blog is only being used by me so there are no other users changing the data. I am using the same method to insert new data in the table and it works perfectly. Can anyone provide me some help since I've been trying this problem for hours but I didn't Manage.

    Thanks in Advanced Ryan

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“C++: an octopus made by nailing extra legs onto a dog.” - Steve Taylor