S
Savas Ates
i have table to understand which user is online or offline...
when a user enter the system i check the my field as 1
when a user quit the site i want to make my field =0
for this i used global.asa Sub Session_OnEnd and Sub Application_OnEnd
both.
Sub Session_OnEnd 'Runs when a user's session times out or quits
your application
when a user leave the site i think in global asa this events trigger..i also
session.timeout features..but it doesnt work.. what is the my fault?
my codes
****************************************************************************
***********************************
Set baglantim=Server.Createobject("ADODB.Connection")
Outpost="PROVIDER=SQLOLEDB;Initial Catalog=friends;User Id=sa
;password=;Data Source=localhost"
baglantim.open outpost
sxx = sql="UPDATE users set status= 0 WHERE userid = 'savas';"
baglantim.Execute(sxx)
End Sub
Sub Application_OnEnd
Set baglantim=Server.Createobject("ADODB.Connection")
Outpost="PROVIDER=SQLOLEDB;Initial Catalog=friends;User Id=sa
;password=;Data Source=localhost"
baglantim.open outpost
sxx = sql="UPDATE users set status= 0 WHERE userid = 'savas';"
baglantim.Execute(sxx)
End Sub
****************************************************************************
***********************************
when a user enter the system i check the my field as 1
when a user quit the site i want to make my field =0
for this i used global.asa Sub Session_OnEnd and Sub Application_OnEnd
both.
Sub Session_OnEnd 'Runs when a user's session times out or quits
your application
when a user leave the site i think in global asa this events trigger..i also
session.timeout features..but it doesnt work.. what is the my fault?
my codes
****************************************************************************
***********************************
Set baglantim=Server.Createobject("ADODB.Connection")
Outpost="PROVIDER=SQLOLEDB;Initial Catalog=friends;User Id=sa
;password=;Data Source=localhost"
baglantim.open outpost
sxx = sql="UPDATE users set status= 0 WHERE userid = 'savas';"
baglantim.Execute(sxx)
End Sub
Sub Application_OnEnd
Set baglantim=Server.Createobject("ADODB.Connection")
Outpost="PROVIDER=SQLOLEDB;Initial Catalog=friends;User Id=sa
;password=;Data Source=localhost"
baglantim.open outpost
sxx = sql="UPDATE users set status= 0 WHERE userid = 'savas';"
baglantim.Execute(sxx)
End Sub
****************************************************************************
***********************************