Hello,

I have a question about the way ADO handles connections
to the database. Let say method foo1() in ObjectA opens a
connection to a database and before closing the
connection it calls a method foo2() in ObjectB which also
opens a connection (to the same database), and before
closing it it calls a method foo3() in ObjectC, etc....
So it's sorta recursive. My question is if it opens
separate connection for each of those objects, thus using
up my resources?

Thank you in advance for your help,

Merci,
Krista Lemieux

Re: New Connection on nested calls? by Marina

Marina
Wed Jul 28 10:27:49 CDT 2004

What is your question exactly?

Opening up more connections, does use up more resources, if that is what you
are asking.

"Krista Lemieux" <kirstalemieux@hotmail.com> wrote in message
news:5c4a01c474b6$b1b49bd0$a301280a@phx.gbl...
> Hello,
>
> I have a question about the way ADO handles connections
> to the database. Let say method foo1() in ObjectA opens a
> connection to a database and before closing the
> connection it calls a method foo2() in ObjectB which also
> opens a connection (to the same database), and before
> closing it it calls a method foo3() in ObjectC, etc....
> So it's sorta recursive. My question is if it opens
> separate connection for each of those objects, thus using
> up my resources?
>
> Thank you in advance for your help,
>
> Merci,
> Krista Lemieux



Re: New Connection on nested calls? by Krista

Krista
Wed Jul 28 10:40:43 CDT 2004

Sorry.... Should have mentioned that I read something
about connection pooling by ADO.NET.
So the question is basically does it open up N separate
connections to the same database?

And basically where does connection pooling come in, and
how does it apply to my issue. Does it recognize that
this, whatever I'm doing can be done through the same
connection as other objects are using (Thus not consuming
so many resources)?

Merci,
Krista Lemieux


>-----Original Message-----
>What is your question exactly?
>
>Opening up more connections, does use up more resources,
if that is what you
>are asking.
>
>"Krista Lemieux" <kirstalemieux@hotmail.com> wrote in
message
>news:5c4a01c474b6$b1b49bd0$a301280a@phx.gbl...
>> Hello,
>>
>> I have a question about the way ADO handles connections
>> to the database. Let say method foo1() in ObjectA
opens a
>> connection to a database and before closing the
>> connection it calls a method foo2() in ObjectB which
also
>> opens a connection (to the same database), and before
>> closing it it calls a method foo3() in ObjectC, etc....
>> So it's sorta recursive. My question is if it opens
>> separate connection for each of those objects, thus
using
>> up my resources?
>>
>> Thank you in advance for your help,
>>
>> Merci,
>> Krista Lemieux
>
>
>.
>

Re: New Connection on nested calls? by Marina

Marina
Wed Jul 28 10:52:28 CDT 2004

Connection pooling refers to when you open and close connections. Those
connections are drawn from the pool.

But opening up N separate connections, will take N connections from the
pool. The connection pooling does not come into the picture here, other
then those N connections will all be taken from the pool - but are not
pooled in your program once they are open.

"Krista Lemieux" <kirstalemieux@hotmail.com> wrote in message
news:5e0901c474b9$3e61b8e0$a501280a@phx.gbl...
> Sorry.... Should have mentioned that I read something
> about connection pooling by ADO.NET.
> So the question is basically does it open up N separate
> connections to the same database?
>
> And basically where does connection pooling come in, and
> how does it apply to my issue. Does it recognize that
> this, whatever I'm doing can be done through the same
> connection as other objects are using (Thus not consuming
> so many resources)?
>
> Merci,
> Krista Lemieux
>
>
> >-----Original Message-----
> >What is your question exactly?
> >
> >Opening up more connections, does use up more resources,
> if that is what you
> >are asking.
> >
> >"Krista Lemieux" <kirstalemieux@hotmail.com> wrote in
> message
> >news:5c4a01c474b6$b1b49bd0$a301280a@phx.gbl...
> >> Hello,
> >>
> >> I have a question about the way ADO handles connections
> >> to the database. Let say method foo1() in ObjectA
> opens a
> >> connection to a database and before closing the
> >> connection it calls a method foo2() in ObjectB which
> also
> >> opens a connection (to the same database), and before
> >> closing it it calls a method foo3() in ObjectC, etc....
> >> So it's sorta recursive. My question is if it opens
> >> separate connection for each of those objects, thus
> using
> >> up my resources?
> >>
> >> Thank you in advance for your help,
> >>
> >> Merci,
> >> Krista Lemieux
> >
> >
> >.
> >



Re: New Connection on nested calls? by Krista

Krista
Wed Jul 28 11:11:19 CDT 2004

Hi Marina,

Thank you for clearing that up for me. At first I was a
bit confused about the connection pooling. To me it
seemed to be doing something different (from my
understanding). But after you mentioned that to me, I
looked it up again, and now it makes perfect sense.

Thank you for your help Marina


Merci,
Krista Lemieux

>-----Original Message-----
>Connection pooling refers to when you open and close
connections. Those
>connections are drawn from the pool.
>
>But opening up N separate connections, will take N
connections from the
>pool. The connection pooling does not come into the
picture here, other
>then those N connections will all be taken from the
pool - but are not
>pooled in your program once they are open.
>
>"Krista Lemieux" <kirstalemieux@hotmail.com> wrote in
message
>news:5e0901c474b9$3e61b8e0$a501280a@phx.gbl...
>> Sorry.... Should have mentioned that I read something
>> about connection pooling by ADO.NET.
>> So the question is basically does it open up N separate
>> connections to the same database?
>>
>> And basically where does connection pooling come in,
and
>> how does it apply to my issue. Does it recognize that
>> this, whatever I'm doing can be done through the same
>> connection as other objects are using (Thus not
consuming
>> so many resources)?
>>
>> Merci,
>> Krista Lemieux
>>
>>
>> >-----Original Message-----
>> >What is your question exactly?
>> >
>> >Opening up more connections, does use up more
resources,
>> if that is what you
>> >are asking.
>> >
>> >"Krista Lemieux" <kirstalemieux@hotmail.com> wrote in
>> message
>> >news:5c4a01c474b6$b1b49bd0$a301280a@phx.gbl...
>> >> Hello,
>> >>
>> >> I have a question about the way ADO handles
connections
>> >> to the database. Let say method foo1() in ObjectA
>> opens a
>> >> connection to a database and before closing the
>> >> connection it calls a method foo2() in ObjectB which
>> also
>> >> opens a connection (to the same database), and
before
>> >> closing it it calls a method foo3() in ObjectC,
etc....
>> >> So it's sorta recursive. My question is if it opens
>> >> separate connection for each of those objects, thus
>> using
>> >> up my resources?
>> >>
>> >> Thank you in advance for your help,
>> >>
>> >> Merci,
>> >> Krista Lemieux
>> >
>> >
>> >.
>> >
>
>
>.
>