[thelist] best practice question

Casey Crookston caseyc at IntelliSoftmn.com
Tue Aug 8 14:39:58 CDT 2006


CHRIS:

I have used a SqlHelper class with (amongst others) a static method
GetConnection(). When I need a connection, in VB I would specify:

Dim dbConnect As SqlConnection = SqlHelper.GetConnection()

CASEY:

Okay, but then you still need to instantiate the object "dbConnect" on
as needed basis.  What I'm wondering if there is a way to only
instantiate it once per application, and then refer to it as many times
as needed.






More information about the thelist mailing list