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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top