How do I detect if a user on a client network is logged into the database or not?

Tranborg

New Member
I want to build a license control in my application. Max X simultaneous users is allowed.
If I create a record on login, and delete the record on logoff, its ok if the user logs off. But if the user logon and crash out, the record is still there, and the account is used.
My problem:
How do I detect if a user on a client network is logged into the database or not?
Any help is appreciated.

Regards
 

bendaluz2

Member
Enable the virtual system tables on the server.
Code:
proutil <db> -C enablevst

Then, you will be able to do:
Code:
FOR EACH _connect
    WHERE _connect._connect-type = "REMC"
    NO-LOCK:
    /* Count the records or whatever */
END.
To find out how many remote connections there are to the database

Originally posted by Tranborg
I want to build a license control in my application. Max X simultaneous users is allowed.
If I create a record on login, and delete the record on logoff, its ok if the user logs off. But if the user logon and crash out, the record is still there, and the account is used.
My problem:
How do I detect if a user on a client network is logged into the database or not?
Any help is appreciated.

Regards
 
Top