troubleshooting Question

Intermittent concurrency violation in single-user operations

Avatar of ElrondCT
ElrondCTFlag for United States of America asked on
Visual Basic.NET
2 Comments1 Solution639 ViewsLast Modified:
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.
ASKER CERTIFIED SOLUTION
Sancler

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros