Common ADO.NET Technical Problem

Khaledinho

Active member
Joined
Jun 22, 2005
Messages
25
Hi
I am facing a problem in every .NET Application I tried to develop.
I writing a simple database application that connects to an access file.
This access file has three tables and I created the user interface and did all the nessary binding.
The user can insert,delete,update rows to the dataset.Everything works fine on the dataset.
When I try to update the the database (access file) using the data adapter methods (Adapter.Update()) Sometimes I receive the following exception
[Concurrency Excption thrown, 0 records was affected the command).
This error happens suddenly and at random times when using the update method.
After the exception occurs I cannot use the update method again because it throws the same Exception
Please help
:mad: :( :(
 
A concurrency violation occurs when the original version of the data in the DataTables does not, or cannot be determined to, match the data in the database. It is assumed that someone else has updated the database since so you are working with stale data. There are ways to remove concurrency checking on updates but it is better to fix the issue than ignore it and use brute force. I have received these errors before but I cant remember the specifics or how I fixed them. Id definitely recommend a help search for "concurrency" to at least help you understand what it means and how violations can occur.
 
I have noticed that this problem mainly occurs when the using the access because access is slow in making the updates.I a the user of the program chose to update tha date (the changes were much) and then after short period the user also wants to update this exception is thrown.(Becuase the first update is still working)
Could this be the problem?
Thanks
 
Hi
I discoverd the problem
I used .NET wizard to generate the form and code.The same problem occured
This is because the access is slow.
I dont think that the same problem will happen i used SQL Server.
What do you think?
:confused:
 
Back
Top