Update modes

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Atys
Posts: 16
Joined: Sun 15 Nov 2015 20:26

Update modes

Post by Atys » Fri 26 May 2017 07:32

Hi,

I would like to ask, what is the proper way to detect if the current record has been changed by another
user before posting back to the db?

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: Update modes

Post by azyk » Mon 29 May 2017 13:47

To solve the specified issue, you can set the TUniQuery.LockMode property to lmPessimistic. If between dataset opening and the Edit method call the current record is changed by another user - UniDAC will generate the error message 'Record was changed by another user'.

Atys
Posts: 16
Joined: Sun 15 Nov 2015 20:26

Re: Update modes

Post by Atys » Wed 07 Jun 2017 23:37

Thank you

Post Reply