Results 1 to 2 of 2

Thread: Delete

  1. #1
    Ranjith Guest

    Default Delete

    hi,<BR>I want to delete a record from the table when a user closes his browser,I have written the script for this on the Session_OnEnd,but it&#039s not working,any help would be appreciated.<BR>My code goes like this:<BR><BR><BR>SUB Session_OnEnd<BR>set connect = server.CreateObject ("ADODB.connection")<BR>connect.Open "DSN=xxx;UID=xx;PWD=xxxx;"<BR>str = "delete login where user_id = " & trim(rs("user_id"))<BR>connect.execute (str)<BR>connect.Close<BR>set connect = nothing<BR>end if<BR>END SUB<BR><BR>where user_id is an interger field.<BR><BR><BR>Or is there any other way of doing it.<BR><BR>Thanks

  2. #2
    besharah Guest

    Default RE: Delete

    The problem may be that your session onEnd event code is not executing. In my experience it is unwise to place important code in the session on end event since half the time it will never run.

Posting Permissions

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