how to share the connection?

D

dollar

I got it, thanks

Kevin said:
Hi dollar,

What I meant was, do not share a Connection. Open and clase you
Connections
as quickly as possible. If they share the same Connection String
they will
be pooled and reused, without your having to do anything special, du
to the
built-in Connection Pooling in .Net.

Another way to look at it is this: If you come from an AS
background, and
you're used to having to create and reuse a Connection in order t
save
resources used when opening new Connections, you don't have to worr
about
that any more. .Net has built-in Connection Pooling that, in
sense,
handles this for you. In fact, it is much safer and better to ope
and clse
each Connection as quickly as possible. When you close th
Connection, you
release it to the Connection Pool. It is not destroyed immediately
but
pooled by the .Net platform.

Does that help?

--
HTH,

Kevin Spencer
Microsoft MVP
...Net Developer
What You Seek Is What You Get



-
dolla
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,273
Latest member
DamonShoem

Latest Threads

Top