Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ID of locking user under NT4

Status
Not open for further replies.

pennyman

IS-IT--Management
Nov 7, 2001
19
GB
Does anyone know of a way to identify the user or workstation that is either locking a table or record, or simply has a record in use?

I support an application with a considerable amount of legacy code, and where a transaction or simple update fails due to a record being in use I would like to be able to identify the 'in use' user.

Even if the specific user who is on the record can't be identified, a list of those users with the table open would be a start.

I'd be happy to use API calls, third party components etc if necessary!

Thanks.
 
Try this:

Right click on My Computer
Select Manage
Under System Tools expand Shared Folders
Select Open Files
On the menu bar select View then Details.
Dave S.
 
Sorry, I was assuming an NT server there.
For Netware, here's an app I use:

http:/
I can't seem to get the NT version to do anything but I liked the Netware version so well I registered/payed.
Dave S.
 
Apologies Dave, I didn't make myself clear.

I was after something programatic that I can include into code.

Cheers anyway!
 
I haven't researched any api calls but gadgetfactory also has "Whohas.exe" which you may be able to use in the interim like:

WHOHAS *.DBF > c:\user.txt

Then work the text file from there.
Dave S.
 
I'm presuming both server and client are NT4.

1) If you're looking for a Win32API, refer to NetFileGetInfo.
2) If you install the ADSI client for NT, you can use the IADsFileServiceOperations and IADsResource classes.
3) If you install the WMI client for NT, you can use the Win32_NetworkConnection class.

Either way, you're going to need admin rights. Refer to the MSDN for more info and examples. Jon Hawkins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top