MySQL Forums
Forum List  »  Microsoft Access

Access Forms won't add or update records
Posted by: philippe pons
Date: June 21, 2022 01:50AM

I have a problem using an Access front end connected to a MySql Database.
I test UPDATE on one small table with a VBA procedure, using DAO
sql = "UPDATE tblFormateur "
sql = sql & " SET Prenom = 'Werner' "
sql = sql & " WHERE Nom='HEISENBERG' "
The first time I run the query, it's ok.
But if I run the same query, without changing the value,(keeping Prenom = 'Werner')
I get an error message saying that the query has not been executed,
due to a lock violation.
If I run the query again, but with a different value, e.g Prenom = 'Peter',
the query is executed without error.

On the other hand, If I do the same experiment with ADODB,
I do not get any error.

One can say: let's go with ADODB!

The problem is that the Access front-end Forms use DAO, not ADODB!
So all the forms won't be able to either add new records or update records.

Did you experienced the same issue?
Are there some parameters of the ODBC driver that needs to be set?

Thank's advance for any help.

Windows 1
Access Office 365
ODBC connector 8.0 CE

Options: ReplyQuote

Written By
Access Forms won't add or update records
June 21, 2022 01:50AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.