Lock record demo

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Sawlmgsj
Posts: 35
Joined: Thu 11 Nov 2004 08:35

Lock record demo

Post by Sawlmgsj » Tue 27 Nov 2007 09:33

Using the Lock demo.

Two instances of program - edit a record in first.
Try to edit same record in second. Get hour glass and wait.
Only released after saving first instance.

How do I return a message to user of second instance.
Where do I place 'try except' clause?

Have tried it in MSQuery1BeforeEdit, but has no effect - just sits there waiting. Do I need to set anything else?

Thanks,
Steve.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Tue 27 Nov 2007 13:06

You should change value of the LOCK_TIMEOUT server variable to get an exception when the lock attempt failed.
More information about this variable you will find by this link.

Post Reply