Page 1 of 1

Is it possible to find out which user has a ROWLOCK on a table?

Posted: Wed 14 Apr 2021 03:53
by mjbcomp
i am trying to determine which user has a record locked in 'edit' mode.

In Rad Studio (Delphi) before i try and change a ROW value i use this code:

try
tCustomer.Edit;
except on E: EDAError do
begin
if e.ErrorCode = 1205 then Showmessage('Record in Use');
end;

This part works flawlessly as the TMyTable or TMyQuery returns the 1205 error code indicating the current record/row is locked by another user. But if that user has walked away from their desk to go to lunch or if they're on the phone i want the second user who needs to get access to the record to at least know WHICH user has the record locked.

Is something like this possible?

I know you can query CONNECTION_ID() or CURRENT_USER() but that is for the current client. I need a way to get at which CONNECTION_id or User OR wINDOWS LOGIN ACCOUNT is is.

Thanks in advance.

Re: Is it possible to find out which user has a ROWLOCK on a table?

Posted: Wed 14 Apr 2021 11:36
by ViktorV
Your question relates to the server specifics rather than our components' functionality. You may consult the server's documentation, contact support, or search for an answer on specialized forums.

Re: Is it possible to find out which user has a ROWLOCK on a table?

Posted: Wed 14 Apr 2021 23:33
by mjbcomp
Ok thank you.

Re: Is it possible to find out which user has a ROWLOCK on a table?

Posted: Fri 16 Apr 2021 08:10
by ViktorV
Thank you for your interest in our products.
Feel free to contact us if you have any further questions about our products.