User Access

  • Thread starter Thread starter Kartic
  • Start date Start date
K

Kartic

Hi,
I have created an application in vb.net using SQL Server 2000 database .
What I want is to restrict users to access the application more than once,
from the same computer or from any other computer. What is the best way
doing it as database is disconnected.

Currenty I am storing/flag the login name in some table at the time of
appliation load, and remove it when the user close the application. But it
doesn't work always, especially when program closes abnormally. To remove
the flag I have created another program. I still dont know what is the right
way doing it.
Any help/suggestion would be appriciated.

Thanks, Kartic
 
If using SQL Server I would set up a scheduled job to
check for users who are still logged on over a period of
time...

The other way is use a trsuted connection to connect to
the database... Then store there user name in a table on
the database. You could then run a stored procedure in a
job to check if the user is in the sysprocesses table in
the master database, if the use is located in your table
and not in the sysprocesses table then they have not
logged off the application correctly... (Also you should
use the system stored procedure sp_who2 rather then query
the sysprocesses table :) ).

Glenn
 
Back
Top