create a common connection (which will use in the whole website) under Session_OnStart and destroy it uner Session_OnEnd?<BR><BR>Thanks.<BR>
it's a shockingly bad habit which effectively locks IIS down to a single thread
create the connection object in an common include file. Include this file on whichever page you need it to talk to the database. After you are done with using it, free the connection object.<BR><BR>~Roy
or possibly (as I do) store your connection string in an application variable. I also generally have a WSC with common database functions in it which I can call when needed.
so you mean to close the connection on every pages that I included the common file?
yes. open late, close early.
then you should close and free the object explicitly as soon as you are done with using it.<BR><BR>That will help the performance of the asp pages.<BR>
thanks for you guys!