By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,257 Members | 1,176 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,257 IT Pros & Developers. It's quick & easy.

Concurrency violation on Row Delete in Data Grid

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.