Forums

ASP

This topic is locked

global.asa problem

Posted 10 Nov 2006 12:20:06
1
has voted
10 Nov 2006 12:20:06 Olivier Florence posted:
first time using global.asa, I am entering a session id in a database when the user logs in, if the user does not use the log out button I need to rely on global.asa to remove the record in the database so here is what I have but it does not work:


<pre id=code><font face=courier size=2 id=code> &lt;SCRIPT LANGUAGE="JavaScript" RUNAT="Server"&gt;


function Session_OnEnd()
{
var adoConnection = Server.CreateObject("ADODB.Connection";
adoConnection.Open("dsn=xxx;uid=yyyy;pwd=zzzz;";

var removeT = "DELETE FROM tblTrack WHERE sesId = '"+String(Session.SessionID)+"'";
adoConnection.Execute(removeT)



}

&lt;/script&gt;
</font id=code></pre id=code>

many thanks

Reply to this topic