Khaledinho Posted June 22, 2005 Posted June 22, 2005 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: :( :( Quote Life is the biggest school
jmcilhinney Posted June 23, 2005 Posted June 23, 2005 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 can't remember the specifics or how I fixed them. I'd definitely recommend a help search for "concurrency" to at least help you understand what it means and how violations can occur. Quote
Khaledinho Posted June 23, 2005 Author Posted June 23, 2005 Yes all tables have primary keys. Quote Life is the biggest school
Khaledinho Posted June 23, 2005 Author Posted June 23, 2005 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 Quote Life is the biggest school
Khaledinho Posted June 23, 2005 Author Posted June 23, 2005 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: Quote Life is the biggest school
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.