CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2010
    Posts
    17

    Help. How can I log people out of a database

    I have one database that on our server that 5 people login to. Sometimes throughout the month I need then to logout so I can add, update ect.

    Is there a simple code or way I can log everyone that’s logged into my database. I’ve seen code that will log people off if the database is split; I’m not ready to split the database.

    I was thinking sometime like creating a hidden form and then do something to make the database close.

    Any help would be appreciated

  2. #2
    Join Date
    Feb 2005
    Location
    Denmark
    Posts
    742

    Re: Help. How can I log people out of a database

    Which database system is it?

  3. #3
    Join Date
    Aug 2003
    Location
    Sydney, Australia
    Posts
    1,900

    Re: Help. How can I log people out of a database

    I also have this problem

    Can this be done for

    MS Access ?

    MS SQL Server ?

  4. #4
    Join Date
    Feb 2005
    Location
    Denmark
    Posts
    742

    Re: Help. How can I log people out of a database

    Depending on how harsly you want to do it in SQL Server, you can just kill all connections as you detach the database.

    Otherwise - more "soft", depending on how people log in (if they log in via an application you control), then you can perhaps simply just kill connections to the database (sql server):
    script for "kill active connections" and then prevent them from logging in.

    However be careful doing something like this, because of how data can be inconsistent. It's much nicer to simply have an application the users go through control the connections of the database.
    Last edited by Alsvha; March 3rd, 2011 at 11:55 PM.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured