Re: ado connection object in vb6
- From: "Jan Hyde (VB MVP)" <StellaDrinker@xxxxxxxxxxxxxxxxxxx>
- Date: Tue, 22 Apr 2008 17:09:01 +0100
"wb" <none>'s wild thoughts were released on Tue, 22 Apr
2008 08:26:13 -0700 bearing the following fruit:
I am working through some performance issues with regards to Insert and
Update procedures using a global connection object. During the first
lifecycle of my project, I used an activex dll to store all my classes and
within each class they use this global connection object to interface with
the database (SQL Server). On the most recent update I needed to use the
global connection object within my exe project so I just created a second
global connection object to the same DSN as the activex dll. So I basically
have two, one for all the classes within the dll and one for all the other
"needs" within the exe. Both are created within modules at the time the
program launches.
The end result, the application slows way down when doing any type of insert
or update. Is there a limit on the number of connection objects? Should
the objects be global or local variables?
Global connection objects are bad in so many ways. I guess
you're not even using transactions right?
I'm not sure why (perhaps someone can fill in here) but I
have seen the same performance issue in apps the use global
connections and then increase the number of connections.
Really you should create a connection at the point you use
it and close it as soon as you are done.
--
Jan Hyde
https://mvp.support.microsoft.com/profile/Jan.Hyde
.
- Follow-Ups:
- Re: ado connection object in vb6
- From: wb
- Re: ado connection object in vb6
- References:
- ado connection object in vb6
- From: wb
- ado connection object in vb6
- Prev by Date: ado connection object in vb6
- Next by Date: Re: ado connection object in vb6
- Previous by thread: ado connection object in vb6
- Next by thread: Re: ado connection object in vb6
- Index(es):
Relevant Pages
|
Loading