I'm struggling with an intermittent error in my VB .NET 2003 application. I have the app set up for single-user operations; optimistic currency has been turned off for all DataAdapters, and I check to make sure any .pdb file of the same name as the Access .mdb file that's being opened can be deleted, to make sure no one else is using the data file at the same time. I'm using a database that contains three tables, a parent and two child tables.
Occasionally, I am getting a concurrency error:
Concurrency violation: the UpdateCommand affected 0 records
The error seems to always occur on one of the child tables. using the following command:
dsCurrent = CType(dsEZ13A.GetChanges, dsEZ13)
If dsCurrent.Rent.Count <> 0 Then
result = DA.odbdaRent.Update(dsCurrent)
End If
Trying the update again, once I get the error, is pointless; the error will recur as long as I try. If I abandon the changes, shut down the program, and go back and make the same change, it always works. I think I've only noticed the problem when making changes to an existing record, rather than when entering new records.
The fact that it's intermittent (I haven't been able to define a series of steps to cause the error) means it'll be tough to try out suggestions, but I'd appreciate any thoughts on what might be going on.