Help with getting the login name of the user who is blocking 
Author Message
 Help with getting the login name of the user who is blocking

In my application, I'm trying to set it up so that when a user wants to edit
a row, the recordset requests a pessimistic lock on that row, using a server
side cursor.  When another user has locked a row that I request a lock for,
I get an error message "Lock timeout request period exceeded" or something
similar.  So far so good.

Now how would I go about getting the name of the user that is blocking me?
One example may be, a user is in the middle of editing a row, then leaves
for lunch.  I try to edit the row and it says "UserX has locked this row."
Then I could go talk to UserX.  I have code in place that runs sp_who to see
who is blocking, but the main problem is that I cannot get it to execute
sp_who WHILE I'm waiting for the lock!  Even when I use the option
adAsyncExecute, it refuses to run any more commands against the data source
until it times out, and by then the entries are erased from sysprocesses so
its too late to see who was blocking me.  I have even tried using a separate
recordset with a different provider, and logging in as another user, but it
still won't work.  I want to run sp_who at the same time I'm requesting the
lock.  Is this possible?

--
Scott Shell

Please post replies both to the newsgroup and to my email address,



Mon, 05 May 2003 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Getting USers Login Name

2. Getting NT Users LOGIN NAME?

3. Getting user LOGIN name from Windows?

4. Getting NT User Login Name

5. How to get the login Name of the Remote machine, I am having the host name

6. Getting Machine Name/Login Name

7. Help getting the *REAL* Network login name

8. LDB Viewer -- Need to get NT user login name in addition to computer name

9. Need Help Getting User's Group From Login Account on NT

10. HELP: Login-names of all network-users

11. HELP: Login-names of all network-users

12. getting users name and workstation name Urgent

 

 
Powered by phpBB® Forum Software