MikeBronner
Programmer
I tried using the global.asa file, which contains the following:
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
SUB Session_OnEnd
SET conn = SERVER.CREATEOBJECT("ADODB.Connection"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
conn.OPEN "DRIVER=SQL Server;SERVER=mssql.homestead.wellsfargo.com;Trusted_Connection=No","my_user_id","my_password"
SET resultSet = ExecStmt("UPDATE users SET logged_on = 0 WHERE user_id = " & SESSION("login"
)
conn.CLOSE
SET conn = NOTHING
END SUB
</SCRIPT>
However, it doesn't work. Do you see anything I am missing? One thing I am wondering is if I can reference SESSION elements in the OnEnd section.
My intent is to update the database to reflect who is logged in and who isn't. So I want the Session_OnEnd to do this for me when the user ends his or her session by closing the browser or timing out.
Thanks for all your help! Take Care,
Mike
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
SUB Session_OnEnd
SET conn = SERVER.CREATEOBJECT("ADODB.Connection"
conn.OPEN "DRIVER=SQL Server;SERVER=mssql.homestead.wellsfargo.com;Trusted_Connection=No","my_user_id","my_password"
SET resultSet = ExecStmt("UPDATE users SET logged_on = 0 WHERE user_id = " & SESSION("login"
conn.CLOSE
SET conn = NOTHING
END SUB
</SCRIPT>
However, it doesn't work. Do you see anything I am missing? One thing I am wondering is if I can reference SESSION elements in the OnEnd section.
My intent is to update the database to reflect who is logged in and who isn't. So I want the Session_OnEnd to do this for me when the user ends his or her session by closing the browser or timing out.
Thanks for all your help! Take Care,
Mike