Problem with Record Lock

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
billylo
Posts: 2
Joined: Thu 19 Mar 2015 12:39

Problem with Record Lock

Post by billylo » Thu 19 Mar 2015 12:48

Hi,

with SDAC, I can lock a record within a query without any problems. No user can edit it. With UnidDAC, the whole table is locked. You cannot even execute a select on it. Does anybody know how I can lock only one record?

My current code:

Query.LockMode := lmPessimistic;
...
Query.Lock;
Query.RefreshRecord;
Query.Edit;
...

FCS
Posts: 176
Joined: Sat 23 Feb 2013 18:46

Re: Problem with Record Lock

Post by FCS » Thu 19 Mar 2015 14:27

Hello,

Maybe this will be helpful for you:

http://forums.devart.com/viewtopic.php?f=28&t=27371

Regards
Michal

billylo
Posts: 2
Joined: Thu 19 Mar 2015 12:39

Re: Problem with Record Lock

Post by billylo » Thu 19 Mar 2015 17:32

Hi,

unfortunately no help for my problem. When I do so, the whole table is locked an nobody can access it until the lock is over.

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

Re: Problem with Record Lock

Post by azyk » Fri 20 Mar 2015 10:28

We can't reproduce the problem for SQL Server using the code you have provided. Please compose a complete small sample to reproduce the issue and send it to andreyz*devart*com . In addition, include test table creating scripts in the project.

Post Reply