CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> .NET

 Tracking Who's Logged In

Print topic Send  topic

Author Message
sgadson

Posts: 45
Posted: 09/02/2004, 7:35 PM

Using: vb.net; sql

I would like to be able to track when a user is online. I have a field in my Users table named: Online (int)

When a user loggs in I would like to set this value to 1. When the user loggs out or if their scession times out I would like to set this value to 0.

Can someone give me the code to do this?

FYI - I saw a similar post on the old forum but the solution was not given in vb.net.
_________________
Shawn :-)
View profile  Send private message
Benjamin Krajmalnik
Posted: 09/02/2004, 9:03 PM

You can write code in the login and logout functions to set or clear the
flag.
However, if there is a session timeout it will not work.

In order to check this, I would do it slightly differently.
I woul use a connections table which has the username and the time they
logged in.

Now, every time a page is accessed, you have to refresh the "last connected"
time for the specific user and run a query which would delete all cnnections
older than your session timeout variable.

I think this will yield about as accurate a result as you will get.

"sgadson" <sgadson@forum.codecharge> wrote in message
news:84137d879de252@news.codecharge.com...
> Using: vb.net; sql
>
> I would like to be able to track when a user is online. I have a field in
my
> Users table named: Online (int)
>
> When a user loggs in I would like to set this value to 1. When the user
loggs
> out or if their scession times out I would like to set this value to 0.
>
> Can someone give me the code to do this?
>
> FYI - I saw a similar post on the old forum but the solution was not given
in
> vb.net.
> _________________
> Shawn :-)
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

sgadson

Posts: 45
Posted: 09/04/2004, 2:11 PM

:( Does anyone have a code example to achieve this?
_________________
Shawn :-)
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.