Results 1 to 2 of 2
  1. #1
    Join Date
    May 2004

    Question Unanswered: Kick users out of a FoxPro Database

    Is there a way to eject or disconnect the current users of a FoxPro database?

    There are times when we need to do work on the database and a user ignores the messages to get out, or a user leaves for the day and stays logged in to the database...

    Also, are there any issues I ned to be aware of when doing it?


    Anthony Kroes
    Green Bay, WI

  2. #2
    Join Date
    Nov 2004
    Hi Anthony,

    I encountered similar situation as yours.

    What I did was, I include a Timer Procedure in all applications
    that access our DB.

    The timer procedure monitors the length of idle time of the application.
    And when the timer reaches the maximum allowable idle time on every
    session, The Timer Procedure Closes all connections/DBs and terminates
    the application.

    Another approach is, instead of monitoring idle time, you can create a
    table/DBF to be monitor if a specified entry/record in that table exists.

    MONITORING table/dbf has fields

    If you want to disconnect/terminate the connection/session of user 'RED',
    you will insert an entry to the table/dbf you create with username='RED'.
    This creation of record may be another program, Or manually created.

    The Monitoring Procedure checks if the current user's name exists
    on the MONITORING table.
    (you must set how often your monitoring will check the MONITORING table)

    If it exists, Then it will call the terminate/disconnect command.

    Same with group, If you implement groups in your Database.

    Also, to Automate/Schedule,
    you can add field Time for scheduled termination.

    I used the first on our Ingres RDBMS.
    The second on our XBASE (Foxpro/DBase/FoxPlus).

    Its your choice what approach you will use.

    WARNING! This monitoring procedures add OVERHEAD to your Application and

Posting Permissions

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