If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
This line Application("ActiveUsers") = Application("ActiveUsers") - 1 is working properly
but the database updating is not working... but when i place this code on Session_OnStart the database updating is working properly
How session_onEnd is trigger? i believe its when the time of the session runs out? or when the user cllose his window or leave the site?
Please help
Thanks in adavnce!!!
Sub Session_OnEnd
' Decrease the active visitors count when the session ends.
Application.Lock
Application("ActiveUsers") = Application("ActiveUsers") - 1
set cnnPoll= server.createobject("adodb.connection")
cnnPoll.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & SERVER.MapPath("/db/db.mdb")& ";"
set rsLogin = server.createobject("adodb.recordset")
sql = "update member set online = 1 where id_member = 1"
' & Session("Id")
set rsLogin = cnnPoll.execute(sql)
Sorry dude, but I'm new to this myself. Is this code in your Global ASA file? I'll need to do something like this soon (associate an even to Session_OnEnd) and have no idea how to get it to work because I can't post to the Global ASA file (I'm using a shared Webhost).