CheckRowVersion

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jlund
Posts: 22
Joined: Wed 17 Nov 2004 18:50

CheckRowVersion

Post by jlund » Fri 07 Aug 2009 07:10

Hi

I am having a problem when i update a record usin SQL server.

Though i have set CheckRowVersion to False, the row verion is still checked, and I get an error saying that the record has been changed by another user, and in DBmonitor, I can see that a select statement is run just before the update statement.

Furthermore, I can see that a Start is run just before, and a commit just after the select..update in DBmonitor - is this normal behavior ?

This is also true when I use MySQL

TIA Jens Lund

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 07 Aug 2009 07:37

You should set the LockMode property of TUniTable to lmNone. Otherwise TUniTable locks the record and compares values of all data fields to the values from the database before update. If some field was changed in the database, the error is raised.

jlund
Posts: 22
Joined: Wed 17 Nov 2004 18:50

Thank

Post by jlund » Fri 07 Aug 2009 08:18

That worked !

Thanks
/Jens

Post Reply