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
-----Original Message-----
Hello,
"Kartic" <kg****@csystemssoftware.com> schrieb: 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.
Maybe you want to create a trigger in the database which
removes users whodidn't perform an operation on the database for a
certain period. That'sonly an idea, I think the database programmers will be
able to give you abetter solution:
Newsgroup for .NET+database (ADO .NET) questions:
news://msnews.microsoft.com/microsof...c.dotnet.frame
work.adonet
HTH,
Herfried K. Wagner
--
MVP · VB Classic, VB .NET
http://www.mvps.org/dotnet
.