Cleaning up database on session end

Results 1 to 2 of 2

Thread: Cleaning up database on session end

  1. #1
    Join Date
    Dec 1969

    Default Cleaning up database on session end

    I have various temporary tables created in the database while a user is logged on to the website.<BR><BR>Now if the user&#039;s session expires, I need to clear all these tables and remove user specific records. How do I do this on session_onEnd in the global.asa? It seems like I make database calls in the global.asa?<BR><BR>Any ideas?<BR><BR>Greg<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Cleaning up database on session end

    Firstly, you open the global.asa.<BR><BR>Then you create a new subroutine:<BR>Sub Session_OnEnd<BR><BR>End Sub<BR><BR>Then you write code between the two to drop the temporary tables and/or delete the user-specific records. By the way, if you&#039;re creating TABLES on a per-user basis, and keeping them for the life of the session, I would say there&#039;s something wrong.<BR><BR>Think of the incredible amount of work which the DBMS is going to have to do when the site starts to scale. There may be a case for using them, but I&#039;m pretty sure there&#039;s a way around it.<BR><BR>Craig.

Posting Permissions

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