Link to home
Start Free TrialLog in
Avatar of Pamela Brooker
Pamela BrookerFlag for Australia

asked on

Trying to Update a different record from point of focus but always get ERR=3218 Could not update; currently locked

[First EE question here - so hoping the below is clear enough]

Wondered why no update was happening from a rather simple update statement in my variable: vMySQL.
Printed out the contents of vMySQL and applied the same update statement directly to the database - and it worked perfectly, so there is nothing wrong with the statement
 Found the error using the below.
 db.Execute vMySQL, dbSeeChanges + dbFailOnError

Have tried repair database, turning pc off and on, various lock settings in "Tools>>Options>>Advanced Tab", putting DBEngine.Idle dbFreeLocks just before the execute statement but nothing changes. Always get this error.  

Any ideas from anyone?  Any help would be much appreciated
ASKER CERTIFIED SOLUTION
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Pamela Brooker

ASKER

Thanks Gustav for looking into my issue.
Wondering if there is no "true" lock as I was able to stop the processing during debug mode, at the point where the execute statement, is and manually run the update statement successfully.  I thought that since I could do that there that this would mean that there was no true lock?

Hoping you have some more ideas?
Can't tell without your code.
But this is a classic; something/someone is holding/changing the record while you try to update it.
I stand corrected!  Just had my morning coffee :). I must have missed something last night.  Actually the whole table is locked but somehow gets released later in the code. And ... Me.Dirty is True - so you are right and that is a relief.  Just executed another save and all works now.  Now just have to find where unexpected change is happening.

Thanks. Happy to close this now :)
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial