Solved

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

Posted on 2008-10-02
2
1,090 Views
Last Modified: 2012-05-05
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
Comment
Question by:jaydwest
2 Comments
 
LVL 22

Expert Comment

by:RedKelvin
ID: 22631166
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
 

Accepted Solution

by:
jaydwest earned 0 total points
ID: 22633349
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

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

746 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

12 Experts available now in Live!

Get 1:1 Help Now