Solved

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

Posted on 2008-10-02
2
1,094 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

733 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