Click to See Complete Forum and Search --> : About Lockin in SQL Server


dineshns
May 26th, 2004, 01:28 AM
How do i know weather specific record is locked or not using sp_lock or another way?

for Ex.
I have an Employees Table. When another user is editing Employee '001' record. Another user try to edit same record, need to check the lock status before start editing.

I use adLockPessiMistic to open employee table.

Thank u in advance,

dinesh

hspc
May 26th, 2004, 04:19 AM
sp_lock can't do this...
but you can just handle the error that will raise if you try to open/update the locked record.