Update query fails due to lock violations

G

Guest

Greetings.

Running an update query in Access 2003 on linked MySQL tables via ODBC,
running MySQL on a Windows 2003 Server. The query fails, returning the
message that the query didn't update 103 records due to lock violations.

This same query runs just fine when run against the same dataset where MySQL
is running on a Linux machine.

Thanks for the help.

Danny
 
M

Michel Walsh

Hi,


Sounds like your table or, at least, your records, are locked by another
process (or transaction). Databases allow sharing of their data between
multiple users/process, OR NOT, given CIRCUMSTANCES. I don't know MySql, but
is there some management tools listing if a table is locked or not, and by
which process, so, by comparison, see if another process, B, blocks the
process your are debugging, A. It is also possible to create auto-locking
(round robin dead lock) if a single process has multiple threads (such as
VBA and the User Interface) accessing a resource, such as a database. In
short, kill everything else (have ONLY your machine and the server on the
network, if possible) and try to execute the task using ONLY the user
interface, no, any, running code making ANY kind of work, no form open at
all, just the User Interface in its most elementary expression. If you still
experience a lock with your update query under that circumstance, you have,
indeed, a serious problem. If it works, then, the exercise has convinced you
that there is nothing wrong with the driver, neither with Access in itself,
but that the problem is with the management of the processes you use,
probably with a concomitant process occurring simultaneously to your update
(which could have been launch by some running VBA code, or by pending
transaction, such as dirtying a record through a FORM, or even, through a
simple TABLE view/edition).



Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top