SDAC - No Locking because of granularity

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Alex Schickel
Posts: 3
Joined: Tue 27 Mar 2007 13:30
Location: Germany/Birkenfeld

SDAC - No Locking because of granularity

Post by Alex Schickel » Fri 09 Jun 2017 05:37

When I try to lock a record (LockMode = Pessimistic) I get the Error message
---------------------------------------------------
Exception Class EMSError "the Row-Granularity hint for the table can't be used because lock are not allowed with the mentioned granularity..."

(It's roughly translated from the german message)

How can I avoid this error?

brgds. alex.

Alex Schickel
Posts: 3
Joined: Tue 27 Mar 2007 13:30
Location: Germany/Birkenfeld

Re: SDAC - No Locking because of granularity

Post by Alex Schickel » Mon 12 Jun 2017 06:26

Changing my Database from my beloved Advantage Database Server to MS SQL-Server I was not aware that when EMS SQL Manager creates an index it uses the parameters:
......
ALLOW_ROW_LOCKS = OFF,
ALLOW_PAGE_LOCKS = OFF
.....
as a default. You have to allow the locking otherwise you get the granularity error.

brgds. alex.

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

Re: SDAC - No Locking because of granularity

Post by azyk » Mon 12 Jun 2017 09:47

Glad to see you have found the reason of the problem. If any other questions come up, please contact us.

Post Reply