Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8668617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:15:28+00:00 2026-06-12T18:15:28+00:00

I write on MySQL 5.5, C#, ADO.NET, DataSet. I have a DataSet and DataAdapter

  • 0

I write on MySQL 5.5, C#, ADO.NET, DataSet.
I have a DataSet and DataAdapter filled it. In DataAdapter I override INSERT, UPDATE, DELETE commands. When I use stored procedures, as these commands, all is well.
However, when I use transactionns in this stored procedures, I get an exception:

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

What can I do with this errors?

Sample: http://dl.dropbox.com/u/46828938/DataGridSample.zip

To reproduce the problem: Delete row from Datagrid and press “Update” button.

DBConcurrencyException (“Concurrency violation: the DeleteCommand affected 0 of the expected 1 records.”) reproduce on:”productDataAdapter.Update(dataSet, “Products”);” string.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T18:15:29+00:00Added an answer on June 12, 2026 at 6:15 pm

    I learning a lot of documentations about this problem (msdn, mysql forum, stackoverflow, etc) and see:

    Check real concurrency or not possibility do additional queries:

    1. insert: get last inserted row and comparision with inserted row.
    2. update: get updated row (by key for example) and comparision with updated row.
    3. delete: try get row (by key for example) and get null.

    Of course, all described above comparisions nessesary do in one logical bath / connection etc.
    Unfortunately other way check ‘”Concurrency violation” or not on MySql’ isn’t exist. (In defference from others db servers).

    I hope, that this information helps someone.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi I have a query which is very straightforward to write in mysql but
I'm trying to write a valid mysql statement that would allow me to update
How to write this MySQL update statement: table1 identity table2 memberid, username, email Some
I am trying to write simple mysql stored procedure and it seems that I
For a homework assignment, I have to write a MySQL query to calculate the
I want to write a MySql query whereby I want to use combination of
I am trying to write a MySQL insert that only inserts based on the
Hi i have to write a mysql query i will explain the query how
In trying to write a simple C# ADO.NET application to connect to my database
I have to write into MySQL database a lot of data for about 5

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.