Session Variables Question ?

Results 1 to 2 of 2

Thread: Session Variables Question ?

  1. #1
    Persesus Guest

    Default Session Variables Question ?

    I have many many pages that connect to a SQL database, at the moment I am connecting, getting my information and disconnecting.<BR><BR>I have been considering to use Session variables to hold my connection to a database.<BR><BR>The question is: When the user closes their browser would this connection to the database be closed and destroyed correctly? or would it leave bits and pieces floating arround clogging up my server?

  2. #2
    Steve Cimino Guest

    Default RE: Session Variables Question ?

    I would suggest you searching the 4 guys site for the "reason" why you shouldn&#039t hold COM objects and DB Connections in the Session object... they&#039ll give you the indepth reasons.<BR><BR>Doing what you&#039re going right now is the most efficient way. Second, you should never "trust" ASP or COM to close and kill your database objects, etc. You should implicitly set your connections and recordsets to Nothing.<BR><BR>Search the articles.

Posting Permissions

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