Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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: :( :(

Life is the biggest school
Posted
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.
Posted

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

Life is the biggest school
Posted

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:

Life is the biggest school

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...