View Single Post

   
  #1 (permalink)  
Old 02-28-2008, 06:57 PM
Robin Tucker
 
Posts: n/a
Default Keep a few connections open all the time or open/close connections on the fly?


Just a quick question about connection management. My application will
never need more than 1 or 2 connections about at any given time. Also, I do
not expect many users to be connected at any given time. For efficiency, I
would like to keep connections alive throughout the lifetime of the objects
requiring them, rather than opening a new connection, executing code and
then closing it again. What is the most efficient way of doing this?
Should I perform the open/close or just one open when I create the object
and a close when I dispose of it?



Reply With Quote