Identify the IP of the user locking an Access Table / DB

  • When one of us has the Access DB open, the other cannot get it. A pop-up message appears saying something to the effect that you don't have exclusive access to the DB at this time, and so your changes will not be saved.

    We don't have a problem with this lack of flexibility at this time, but my boss has asked me if it was possible to put code in the Access DB to determine if the pop-up message could include the IP address of the machine locking the DB. Is this possible? How to do this? Thanks.

  • For what it is worth, it was written in 2003 and I do not know if it will still function, but I have attached the VB code. By the way it returns the user's name NOT the IP address - at least when it was written maybe the MSLDBUSR.DLL has been modified in the interim.

    Hope it helps.

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • You can use the User Roster to return the name of the computer that the offending user is connecting from - see here:

    http://support.microsoft.com/?id=285822

    http://www.fmsinc.com/free/newtips/access/accesstip2.asp

  • Here is an easy way to to it. I've used this with Access 2000-2002-2003 and Windows 2000-XP-Vista. Edit the INI file to point to your database, and then just run the EXE. The VB6 source code is also included in the ZIP.

    http://www.wvmitchell.com/files/ShowUsers.zip

  • William, thank you very much! great solution! It works. However, it lists each user as logged in twice. Any suggestions?

    WILLIAM MITCHELL (10/2/2008)


    Here is an easy way to to it. I've used this with Access 2000-2002-2003 and Windows 2000-XP-Vista. Edit the INI file to point to your database, and then just run the EXE. The VB6 source code is also included in the ZIP.

    http://www.wvmitchell.com/files/ShowUsers.zip

  • Chris, and thank you! Your solution works, too. It correctly lists just the one user (myself) who is logged in this time.

    I'd like to take this solution and make it into a Web Form. Somehow take the results of the microsoft/Chris Quinn solution and deploy it on an ASP.NET page and have a user-control click on a simple web page and deliver this information (it would be an http page on a local intranet)

    Once again, thanks again to everyone here!

    Chris Quinn (10/1/2008)


    You can use the User Roster to return the name of the computer that the offending user is connecting from - see here:

    http://support.microsoft.com/?id=285822

    http://www.fmsinc.com/free/newtips/access/accesstip2.asp%5B/quote%5D

  • The original article Q198755 does state that if you have the mdb open and also run the utility, it will show your machine twice in the list. The "updated" article 198755 left that out, but it does mention

    "A user's ID remains in the lock database until the last user disconnects or until the slot is reclaimed for a new user connection"

    so maybe the utility is seeing users who have opened, closed and then reopened the mdb?

  • Sounds great I tried but get this error :

    runtime error 3251 object or provider is not capable of performing the action also looked at your VB code my machine does not have stdole2.tlb it does have stdole.tlb running xp pro 2002 sv pac 2

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply