Record was changed by user ...

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
smww
Posts: 1
Joined: Thu 06 Jun 2013 11:19

Record was changed by user ...

Post by smww » Thu 06 Jun 2013 13:38

Hi all - first post to forum,

Curious issue that is causing me some problems. When a user edits record and saves it for the second time the following message appears, "Record was changed by another user".

This issue is common for most clients, except one. That user can edit/save same record multiple times with no message. They are all using the same version of the program.

I am using UNIDAC version 4.6.12 on Delphi 2010. All users are using O/S Win 7.

Any suggestions appreciated
S.

DemetrionQ
Devart Team
Posts: 271
Joined: Wed 23 Jan 2013 11:21

Re: Record was changed by user ...

Post by DemetrionQ » Thu 06 Jun 2013 16:56

Hello.

    To solve the problem, check the TUniTable.LockMode property. If it is set to lmOptimistic or lmPessimistic, then, when attempting to update a record modified by another user, behaviour will be the same as you got. To modify the behaviour, set the TUniTable.LockMode proeprty to lmNone.
The detailed information about LockMode can be read in the UniDAC documentation.

RNOVAK
Posts: 26
Joined: Sat 19 Feb 2011 18:30
Contact:

Re: Record was changed by user ...

Post by RNOVAK » Mon 29 Jul 2013 15:14

Hello smww

See on MySQL database if the field has trigger or default value when your app sets to null. Maybe one trigger changes the field or the default value rewrites your null value.

Roberto

m227
Posts: 75
Joined: Mon 06 Aug 2007 12:41

Re: Record was changed by user ...

Post by m227 » Mon 06 Dec 2021 11:01

Hi, would you clarify what specific TLockMode values do? It is not specified in my UniDac documentation...

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Record was changed by user ...

Post by ViktorV » Tue 07 Dec 2021 15:29

Please note that you can find a well-detailed description of TLockMode at https://docs.devart.com/unidac/devart.dac.tlockmode.htm

Post Reply