473,396 Members | 1,975 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Concurrency violation on Row Delete in Data Grid

Do you know why this error might be happening? Maybe it
is because I have two data adapters open on the same MDB
file?? If this is the problem... how can I keep them
from disturbing each other?

An unhandled exception of
type 'System.Data.DBConcurrencyException' occurred in
system.data.dll

Additional information: Concurrency violation: the
DeleteCommand affected 0 records.

Thanks!

Bob
Nov 21 '05 #1
2 3465
Hi,

I doubt the error is because you have more than one dataadapter to
the same db. I would guess that the error is because deleting a row that is
related to others. Try enclosing the dataadapters update command in a try
catch block. The exception will contain a more detailed error message.

Ken
---------------------
"BobAchgill" <an*******@discussions.microsoft.com> wrote in message
news:23****************************@phx.gbl...
Do you know why this error might be happening? Maybe it
is because I have two data adapters open on the same MDB
file?? If this is the problem... how can I keep them
from disturbing each other?

An unhandled exception of
type 'System.Data.DBConcurrencyException' occurred in
system.data.dll

Additional information: Concurrency violation: the
DeleteCommand affected 0 records.

Thanks!

Bob
Nov 21 '05 #2
Bob,

I had a very similar problem. It turned out to be a crazy thing. It had
nothing to do with concurrency at all; it was that I changed the size of a
field after I had created my dataadapter. All I needed to do was change the
size in the dataadapter's commands and no longer got the concurrency error.
Check to see that the data definition is the same as when you originally
created the dataadapter. Good Luck.

Cheryl
"BobAchgill" wrote:
Do you know why this error might be happening? Maybe it
is because I have two data adapters open on the same MDB
file?? If this is the problem... how can I keep them
from disturbing each other?

An unhandled exception of
type 'System.Data.DBConcurrencyException' occurred in
system.data.dll

Additional information: Concurrency violation: the
DeleteCommand affected 0 records.

Thanks!

Bob

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Charlie Williams | last post by:
I am having difficulty performing updates and deletions on an Access database using the Update() method of the OleDBDataAdapter. I can insert rows without a problem, but I get a concurrency...
3
by: Suzanne | last post by:
Hi All I'm having problems getting my data adapter to throw a concurrency exception with an INSERT command. I want to throw a concurrency exception if an attempt is made to enter a row into...
25
by: nick | last post by:
I'm having trouble updating from a datagrid. It's says "Concurrency violation: the UpdateCommand affected 0 records", though I can't see how it's related to "concurrency". I can insert and delete...
2
by: Niyazi | last post by:
Hi, I have not understand the problem. Before all the coding with few application everything worked perfectly. Now I am developing Cheque Writing application and when the cheque is clear the...
4
by: Steven Nagy | last post by:
Hi Have a problem that consistantly occurs in my applications where using a DataAdapter (OLEDB) and a dataset. Using a simple process of adding a row to the dataset table and then calling the...
4
by: Jerry | last post by:
Hi, I have an app which retrieves data from a sql server table and displays it on a datagrid. If 2 sessions of this app are running and 2 users try to update the same record at about the same...
4
by: elziko | last post by:
I have a DataTable which I did use as the source for a DataGrid, teh data table was popeulated form my database and when I made changes in the grid I used the same DataAdapter to chnage the values...
5
by: Vayse | last post by:
In my save code, most of items save fine. But sometimes I get a concurrency violation message. "Concurrency violation: the UpdateCommand affected 0 of the expected 1 records." It happens on the...
4
by: Bob | last post by:
While testing my my program I came up with a consistency exception. My program consists of three datagridviews, One called dgvPostes which is the parent grid and its two children,one called...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.