|
-
Apr 12th, 2005, 06:35 AM
#1
Thread Starter
New Member
Concurrency Violation
I get a "Concurrency Violation - UpdateCommand affected 0 records" when i update a Dataset twice or more. (Im working in deconnected mode)
The first time, everything is fine, second time i get the error.
If i refill my dataset with the DataAdapter after every save, everything is fine. But i want to reduce the access to database time, so i dont want to reload my dataset each time i do an update ! It is possible to avoid that ?
Im using VB .NET 2003 with Oracle 9I database.
Thank for your help !
Sebastien
-
Apr 12th, 2005, 02:26 PM
#2
Re: Concurrency Violation
I would say that a Concurrency violation is much worse than the delay to re-access the data (which is probably why the error is there).
The trouble is that you are writing data which somebody else might try to read/update (or you may be trying to edit data which somebody else has already updated). This means that two people could both update the same data, and one of their edits will be lost without warning.
You may be able to change the locking mode of the dataset/DataAdapter (I've got no idea how, I havent used them yet) so that you have exclusive access to the data - in which case the error messages may go.
Alternatively limit the data you return to fewer records, so that it can load more quickly. This also has the bonus of reducing locking issues.
-
Apr 12th, 2005, 08:29 PM
#3
Re: Concurrency Violation
Don't crosspost your question. You'll end up with half answers which don't match.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|