Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Sep 2001
    Location
    UK
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Close multiple ADODB connections in VB (VB6)

    I have several computers logged on to a central Access database using VB, and I am trying to close all the connections to every workstation by issuing a command from one workstation, is there any way this can be done?

    Any help would be greatly appreciated.

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Close multiple ADODB connections in VB (VB6)

    The only thing that comes to mind is having the VB program "listen" for a signal from a central source. If the user's PC isn't listening on some kind of loop, I don't see how you could make it close its connection. Having said this, I'm not sure how you would send this message to the other users. I believe there are facilities in the Windows API for doing this (e.g., whatever makes the winpopup program work), or you could simplify it by writing the message to a database or text file that the users poll using native VB features.

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Close multiple ADODB connections in VB (VB6)

    Are you trying to close connections or are you trying to log people out of the database? They aren't the same thing. If you want to kick people out of the database, you can download a free tool called Jet4Admin from <A target="_blank" HREF=http://www.fmsinc.com>FMS Inc</A> that will allow you to administer a Jet database from a network and force users to log out.
    Charlotte

  4. #4
    New Lounger
    Join Date
    Sep 2001
    Location
    UK
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Close multiple ADODB connections in VB (VB6)

    Hi Charlotte

    I am trying to free up the mdb file, so I can delete it without getting a 'file sharing violation' error. I have found in a single user environment that "connection.close" is sufficient to do this, so I need to issue similar commands to other workstations.

    Roger

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •