Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Internet Explorer Exit

Author  Topic 

abacusdotcom
Posting Yak Master

133 Posts

Posted - 2005-04-05 : 04:51:19
Hi All,
Am developing a web application on a LAN. I make everybody to sign in once by updating a field called Logged to 'YES' in users' table. And if the use logged out, d field will be updated to 'NO'. But i discovered that if d user exit the internet explorer, the application will not be able to set logged to 'NO' and this prevent d particular user to sign in again. Please, I need your help.

I sign for fame not for shame but all the same, I sign my name.

mr_mist
Grunnio

1870 Posts

Posted - 2005-04-05 : 05:01:31
Unless you have a stateful application, you will need to rely on some kind of scheduled job running on the sql server that sets people to logged out after a period of inactivity.

-------
Moo. :)
Go to Top of Page

abacusdotcom
Posting Yak Master

133 Posts

Posted - 2005-04-05 : 08:30:04
Hi All,
Mr_mist i will like to subscribe to your suggestions. Please can u give me a script that will do that i.e log one out after a period of inactivity.

I sign for fame not for shame but all the same, I sign my name.
Go to Top of Page

abacusdotcom
Posting Yak Master

133 Posts

Posted - 2005-04-05 : 08:32:24
Hi All,
Mr_mist i will like to subscribe to your suggestions. Please can u give me a script that will do that i.e log one out after a period of inactivity.

I sign for fame not for shame but all the same, I sign my name.
Go to Top of Page

mr_mist
Grunnio

1870 Posts

Posted - 2005-04-05 : 08:56:03
Well, not really as I don't know your data. But basically what it would involve is that you add a datetime column to your users table that is updated whenever a user hits your web site. Then you run a script on a schedule every 15 minutes or so that checks for any users that are marked as logged in that have not visited a page for 15 minutes and then marks them as logged out. Should be a one line update

UPDATE yourtable SET logged_in_status = 0 WHERE logged_in_status =1 and datediff (mi, last_page_visit_time, now()) > 15

-------
Moo. :)
Go to Top of Page
   

- Advertisement -