473,568 Members | 2,964 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.DB ConcurrencyExce ption' occurred in
system.data.dll

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

Thanks!

Bob
Nov 21 '05 #1
2 3479
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*******@disc ussions.microso ft.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.DB ConcurrencyExce ption' 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.DB ConcurrencyExce ption' 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
2283
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 exception when trying to update or delete. I am quite sure that no concurrency conflicts actually exist. Is there a reason why the data adapter I am...
3
2429
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 tb_table when a row with the same int_UID already exists in there. Here is my stored procedure: if not exists (select int_UID from tb_table where...
25
2366
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 with no problem. Here's the code that's causing the problem: public void UpdateDataSource(Dancers.allbookings ChangedRows) { try { if...
2
5257
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 user have to open a form and entera date so we know in report that the desiered check has been cleared. It takes me while to wrtie. But when I try...
4
3821
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 dataAdapter.Update method. The row adds. However if I delete that new row immediately via the dataset, I get a concurrency violation. By deleting...
4
2253
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 time, one of the apps will yield a concurrency violation error. The app with the error will have a little red error symbol next to the record in...
4
1231
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 in the database. However, I now have the need (on a column by column basis) to show the values in the grid as a multiple of what is in the...
5
31409
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 same records each time - once this happens, it never saves ok again. The immediate window also has states: A first chance exception of type...
4
1551
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 dgvPlans and the other dgvTanks. What happens is as follows. I will either create or edit a record in the datagridview dgvPlans and call the Updatedb...
0
7693
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7916
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8117
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6275
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5498
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2101
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
932
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.