Re: Newing a static var?
- From: "Brett Romero" <account@xxxxxxxxx>
- Date: 19 Apr 2006 07:31:49 -0700
When you close or dispose your connection this internal object is releasedand stored back in the pool.
Let's say I run an ad hoc query and created the connection via the
"using" statement. During the time that query is running, a data
reader opens, using the same connection string. This is two
connections from the pool right?
Once both have completed, they are disposed via the using statement.
Are both returned to the pool or just one since they are identical?
It would seem feasible to have both in the pool hanging around to avoid
blocking when two connections are needed, which is a high probability
for most apps...I'd think. Especially if a block of code throws an
exception and doesn't dispose of the connection. What happens to the
connection than?
Where exactly in the framework is the connection pool? Where are some
references on that?
Thanks,
Brett
.
- Follow-Ups:
- Re: Newing a static var?
- From: Ignacio Machin \( .NET/ C# MVP \)
- Re: Newing a static var?
- References:
- Newing a static var?
- From: Brett Romero
- Re: Newing a static var?
- From: Brett Romero
- Re: Newing a static var?
- From: wfairl
- Re: Newing a static var?
- From: Brett Romero
- Re: Newing a static var?
- From: wfairl
- Re: Newing a static var?
- From: Brett Romero
- Re: Newing a static var?
- From: Ignacio Machin \( .NET/ C# MVP \)
- Newing a static var?
- Prev by Date: Re: I want to a event method to be called in the a form.
- Next by Date: "The remote certificate is invalid according to the validation procedure"
- Previous by thread: Re: Newing a static var?
- Next by thread: Re: Newing a static var?
- Index(es):
Relevant Pages
|