Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access and MySQL - Lock Issue

Status
Not open for further replies.

Hap007

MIS
Mar 21, 2003
1,018
US
Hi,

I have a strange problem.

I have an MS Access db link to a MySQL backend using ODBC link. Seems to work fine.

If I open a table and add or change a record in a table, all works fine.

If I open a table and edit a field and move off the record, the data saves fine.

If I open a table and edit a field and then remove the text I entered, when I move off the record, Access reports that Me and another user have edited the same data and I can not save.

Seems that editing and then removing the edit before moving off the record causes this error. I am guessing since the data is not different, something is causing this message. In VBA code, I retrieve a record, .edit, move space to a text field that is already blank, then on the .update (get error) the message error number = 3197.

Anybody have any info on this issue?

I will post on tha Access forum also.

Thanks,
Hap...



Access Developer [pc] Access based Accounting Solutions - with free source code
Access Consultants forum
 
Hi,

I finally figured this out, so I am sharing the solution in case anyone else is having the same problem.

To solve this issue, you must change a flag in the MySQL ODBC DNS connection property.

In OBDC Configure: Pick Details>Flags 1 > and check
'Return Matched rows instead of affected rows' to true.

This solves the Write Error where record appears changed by another user but it really is not.

Hope This Helps somebody,
Hap...


Access Developer [pc] Access based Accounting Solutions - with free source code
Access Consultants forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top