Hi everyone, I have a record loc
Hi everyone, I have a record loc
(OP)
Hi everyone,
I have a record locking problem with the InterBase. I want to lock current row when a user edit it and I want to raise an exception like "this record locked by user A" when another user try to edit same row. I am using Delphi7 and IBX objects. If Params property of IbTransaction is empty ,I can see an deadlock exception on updating the record. But I have to use READCOMMITTED. But this time, application gives no exception. How can I lock a row. Thanks.
I have a record locking problem with the InterBase. I want to lock current row when a user edit it and I want to raise an exception like "this record locked by user A" when another user try to edit same row. I am using Delphi7 and IBX objects. If Params property of IbTransaction is empty ,I can see an deadlock exception on updating the record. But I have to use READCOMMITTED. But this time, application gives no exception. How can I lock a row. Thanks.
RE: Hi everyone, I have a record loc
Besides, why would you lock?
Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.upscene.com
RE: Hi everyone, I have a record loc
What do you recommend me.
RE: Hi everyone, I have a record loc
Do you need to tailor for the deadlock, or for the warning - that's the question.
I guess it depends on taste - some people like to handle the problem afterwards (deadlock), some people like to handle it before it occurs.
Anyway, you will always get a deadlock situation - even if you "lock" the row... Perhaps you can use a flag column to indicate someone is changing it - however, make sure to reset the flag afterwards, and how do you handle client-side crashes?
Food for thought, right?
Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.upscene.com
RE: Hi everyone, I have a record loc
Maybe use different tables. Why on earth 20 people at the same time would update the same field? What is the probability that this happens?
In Interbase you can grant rights on field level. Delphi will come with the standard message sent by Interbase: Insufficient sql rights for operation. No permission for update/write access to table TableName
Steven van Els
SAvanEls@cq-link.sr