Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1099
  • Last Modified:

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

I get the following error message when I execute the below lines.  Any suggestions on what is wrong or how to troubleshoot this.

Me.QuoteReqBindingSource.EndEdit()
Me.QuoteReqTableAdapter.Update(Me.DsetQuote_Entry.QuoteReq)

Concurrency violation: the UpdateCommand affected 0 of the expected 1 records
0
jaydwest
Asked:
jaydwest
1 Solution
 
RedKelvinCommented:
Hi,
2 common reasons are
1. Editing an Auto Increment column.
2. Updating a row of a table which does not have a primary key.

RedK
0
 
jaydwestAuthor Commented:
Thanks for your help.  I did find the issue.  I was closing a connection object in the FInally block but declaring it in the Try Block.  The connection needed to be declared before the Try Statement.  
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now