Results 1 to 3 of 3

Thread: urgent

  1. #1
    sheetal Guest

    Default urgent

    Sub Session_onStart()<BR> Session("StartTime") = Now()<BR> <BR>End Sub<BR><BR>Sub Session_onEnd()<BR> strUserName= Request.ServerVariables(REMOTE_ADDR)<BR> datStartTime = Session("StartTime")<BR> datEndTime = DateAdd("n", -20 , Now())<BR> intMinutes = DateDiff("n", datStartTime, datEndTime)<BR> Dim strsql<BR> strsql=" INSERT INTO time (UserName, SessionEnd, SessionLength) VALUES (&#039" & strUserName & " &#039, #" _<BR> & datEndTime & "#, " & intMinutes & ")"<BR> <BR> <BR> dim oConn<BR> Set oConn = Server.CreateObject("ADODB.Connection")<BR> MdbFilePath = Server.MapPath("hit.mdb")<BR> oConn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & MdbFilePath &";"<BR> oConn.Execute strsql<BR> Session.Timeout 3<BR> <BR> set oConn = Nothing<BR>End Sub<BR><BR><BR><BR>CAN ANYONE CLEAR MY PROBLEM, I PLACED THE ABOVE CODE INMY GLOBAL.ASA FILE AND EVEN AFTER LOGGING IN MANY TIMES INTO MY WEBSITE I DIDNT FIND ANY INFORMATION IN THE DATABASE. WHAT IS THE PROBLEM

  2. #2
    Join Date
    Dec 1969

    Default RE: urgent

    &nbsp;<BR>your session may not be ending, look into the possibilities of that!!<BR><BR>Good luck<BR>jack<BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: urgent

    hai<BR>even i got the same problem , but ididn&#039t get the response,<BR>but same code if u paste on start it will execute.<BR>atleast try for displaying some message on end<BR>if u get any response pls farward to me<BR>dnv_manu@usa.net

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts