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.
Author |
Topic |
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-02-04 : 20:03:08
|
Philip M. Hofer (Frumph) writes "Basically what i'm doing is when a user logs in, it inserts his name into a table, so I can list who is online at that time. When he 'logs off' its simple to just send a call to remove him from that table, however if he just closes the browser or the session just ends I want it to do that as well. This is what I currently came up with which, however doesnt work because when the session ends so does the info on the username. What do you suggest?
Sub Session_OnEnd()
Application.Lock Application("CurrentUsers") = Application("CurrentUsers") - 1 Application.UnLock SQLT = "delete from online where username = '"& Session("username") &"'"
Set Conn = Server.CreateObject("ADODB.Connection") Conn.open, "#####","######","#######"
Set SQLTUser = Server.CreateObject("ADODB.Recordset") SQLTUser.Open SQLT, conn, 3, 3 SQLTUser.close Conn.close Set Conn = Nothing End Sub" |
|
|
|
|