[thelist] best practice question

Chris at globet.com Chris at globet.com
Tue Aug 8 14:13:33 CDT 2006


Peter

[..]

> > Dim dbConnect As SqlConnection = New
> > SqlConnection(ConfigurationSettings.AppSettings("dataConnection"))
> > 
> > What's the best method to keep from repeating this line in 
> > each and every .ascx or .aspx file? In other words, I'd like 
> > dbConnect to be a global object that I don't need to 
> > instantiate on every page, and certainly not within every 

[..]

> 		You could do it when the application starts and 
> load it into Cache...

Would this not defeat the object of connection pooling?

-- 
Chris Marsh
Software Developer
t: +44 20 8246 4804 x828
f: +44 20 8246 4808
e: chris at globet.com
w: http://www.globet.com/

Any opinions expressed in this email are those of the individual and not
necessarily the Company. This message is intended for the use of the
individual or entity to which it is addressed and may contain
information that is confidential and privileged and exempt from
disclosure under applicable law. If the reader of this message is not
the intended recipient, you are hereby notified that any dissemination,
distribution, or copying of this communication is strictly prohibited.
If you have received this communication in error, please contact the
sender immediately and delete it from your system.  





More information about the thelist mailing list