DataBase Connection in Session

  • Thread starter Thread starter Francisco Spaeth
  • Start date Start date
F

Francisco Spaeth

Hi all..

It's a good idea to put a database connection stored in the session and
close and dispose when session ends?

Francisco
 
My understanding is that stroing database connection in session is not
saving you any thing.. it is always better to open connection at the
last minute and close it ASAP when done.

There is a pool of open connections maintained by asp.net,and when you
open a connection one of these connection from the pool is given.
 
Back
Top