Locking problem

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
hills1
Posts: 2
Joined: Wed 17 Feb 2010 09:20

Locking problem

Post by hills1 » Sun 14 Mar 2010 20:34

Hello,

I'm having a problem with record locking.

I've seen the lock demo, and this works very good. I am trying to use this code in my app but this doesn't work properly.
If one user is locking a record, another user is not able to lock a different record, then exception is like trying to lock the same record. (lock request time out period exceeded).

Can anyone give me a hint what i'm doing wrong? Any help would be appreciated.

Thanks in advance,

Wim.

hills1
Posts: 2
Joined: Wed 17 Feb 2010 09:20

Post by hills1 » Tue 16 Mar 2010 15:27

Hello,

Could it be that row locking is not possible if a table doesn't have a primary key field?

Wim.

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Wed 17 Mar 2010 09:10

Yes. Your table should have Primary Key.

Post Reply