Noget galt her..
Er der noget galt med dette session_onend script?Sub Session_OnEnd
Application.Lock
Application("activeUser") = Application("activeUser") - 1
Application("loginUser") = Application("loginUser") - 1
Application("anders") = "sand=" & Session("username")
Set myConn = Server.CreateObject("ADODB.Connection")
myConn.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("ws.mdb") & ";DriverId=25;FIL=MS Access"
Set rs = Server.CreateObject("ADODB.RecordSet")
strSQL = "SELECT * FROM Bruger WHERE (usrID = " & Session("usrID") & ")"
rs.Open strSQL, myConn, 1, 3
If Not (rs.BOF Or rs.EOF) Then
rs("usrOnline") = False
rs("usrLastVisit") = now()
rs("usrOnlineTime") = rs("usrOnlineTime") + DateDiff("s",Session("time"),now)
end if
rs.Update
rs.Close
myConn.Close
Set rs = Nothing
Set myConn = Nothing
Response.Clear
Response.Redirect "/default.asp"
Application.UnLock
End Sub
