[thelist] [ASP Question] Session_OnStart
Jacques Capesius
jacques_capesius at cnt.com
Fri Oct 18 13:16:10 CDT 2002
<original post>
...I figure, having a global.asa file that looked like this would do the
trick...
<SCRIPT LANGUAGE="VBSCRIPT" RUNAT="SERVER">
Sub Session_OnStart
Set SessionCon = Server.CreateObject("ADODB.Connection")
SessionCon.Open "Driver={SQL Server}; SERVER=blaa;
DATABASE=whatever; UID=jondoe; PWD=aintellin;"
SQLQuery = "INSERT INTO Session_stats (sessionID, session_start) "&_
"VALUES ('"&Session.SessionID&"',getdate())"
set theRS = SessionCon.Execute(SQLQuery)
set theRS = Nothing
set SessionCon = Nothing
End Sub
</SCRIPT>
As is probably obvious to some of you ASP Wizards, this code isn't
executing, and i'm not really sure why.
</original post>
<snip>
Are you restarting your webserver after you modify the global.asa file?
</snip>
I stopped and restarted the World Wide Web Publishing Service, but that
doesn't seem to have had an effect.
<snip>
Have you got an application created on the directory the global.asa is
in?
</snip>
the global.asa file is in the root directory of the application, but not the
root directory of the webserver.
More information about the thelist
mailing list