Session_OnEnd calling to the DB

Results 1 to 2 of 2

Thread: Session_OnEnd calling to the DB

  1. #1
    Join Date
    Dec 1969

    Default Session_OnEnd calling to the DB

    Hi all!<BR><BR>I sure hope someone can help me with this cuz I am stumped.<BR><BR>I&#039;m doing a shopping cart for my ASP class and I&#039;m using the Session_OnEnd to clean out the shopping cart table in the DB whenever the session expires (I&#039;m using Session.Abandon to test this).<BR><BR>The problem is that the script is just not being executed. I get no errors and no results.<BR><BR>The code:<BR>Sub Session_OnEnd()<BR><BR>Dim objConn, strSQL<BR>Set objConn = Server.CreateObject("ADODB.Connection")<BR><BR>str SQL = "delete from shoppingCart where sessionID = " & Session.SessionID<BR><BR>objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _<BR> "Data Source=d:ectweb2dlawDatabaseECT353DLaw.mdb;" <BR> <BR>objConn.Execute strSQL<BR>Set objConn = nothing<BR>End Sub<BR>--------------------<BR><BR>I&#039;ve also tried using the Command object to connect and execute but to no avail.<BR><BR>Thanks for any help anyone can give...<BR><BR>Dan

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default Session_OnEnd() is buggy

    the only think i can help you with is to say make sure you have something in your Session_OnStart() as in initilise it.<BR><BR>Then your Session_OnEnd() MAY fire<BR><BR>

Posting Permissions

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