Forum Moderators: open

Message Too Old, No Replies

ASP and MSSQL Connection Problem

         

zyshen

3:27 pm on Jan 24, 2005 (gmt 0)

10+ Year Member



I am building a new website with a mssql driven online catalog. About 50% of pages needs to send query to the database. I am wondering should I connect and disconnect to the database on each individual page? or should I just put it in the session_onstart and session_onend? Which way is more efficient? Thanks

mattglet

6:41 pm on Jan 24, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Absolutely only have the connection open when you need it.

Some words of wisdom often used here:
"Open Late, Close Early"

This means you should wait until the very moment you need the connection open, and close it as soon as you can.