473,729 Members | 1,914 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Connection pooling questions

Hello All,

Some time ago, I implemented a data access layer that included a simple
connectin pool. At the time, I did it all by myself: I created N
connections, each connection associated with a worker thread that would
execute the db commands. The pool was fixed and all the connections
were created when the db access class was instantiated. The
connections remained opened during the whole execution. If a connection
was not available at the moment, then the request would block until one
connection was freed.

In my approach, I did not use the SQL server connection polling (I
actually disabled it in my connection strings).

That was done in c++ using ado. Now, I am in a position where I need to
implement a db access layer in .NET. I was wondering what kind of
support I can get from .NET.

I want to implement a similar model. I would appreciate if you could
weigh on my approach and on the ways to accomplish something similar in
ado.net. I would also appreciate your comments on the approach itself.

Thank you
CD

Dec 6 '06 #1
16 2870
I have a few thoughts:
1.. Is this a Windows Forms or ASP.NET application. The former does not really need a connection pooling mechanism as the entire app might be able to share a common connection.
2.. If it's ASP.NET, then it makes little sense to code, debug, test and deploy your own pooler. The code built into ADO.NET's .NET data providers should work fine.

--
_______________ _______________ ______
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
_______________ _______________ ____
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------

<cr****@yahoo.c omwrote in message news:11******** **************@ f1g2000cwa.goog legroups.com...
Hello All,

Some time ago, I implemented a data access layer that included a simple
connectin pool. At the time, I did it all by myself: I created N
connections, each connection associated with a worker thread that would
execute the db commands. The pool was fixed and all the connections
were created when the db access class was instantiated. The
connections remained opened during the whole execution. If a connection
was not available at the moment, then the request would block until one
connection was freed.

In my approach, I did not use the SQL server connection polling (I
actually disabled it in my connection strings).

That was done in c++ using ado. Now, I am in a position where I need to
implement a db access layer in .NET. I was wondering what kind of
support I can get from .NET.

I want to implement a similar model. I would appreciate if you could
weigh on my approach and on the ways to accomplish something similar in
ado.net. I would also appreciate your comments on the approach itself.

Thank you
CD
Dec 6 '06 #2
CRB,

In my idea do you have another interpretation of Connection pooling than we,
you see it from your side of the application. Mostly by regulars here is
thought in the way the database is handling all connections it needs. AFAIK
is that set to 100, therefore often fair enough to handle all applications
in the same time as all connections are open (this can even be with more
ASPNet applications running). Therefore is than the advice to close as often
as possible (in other words all the time that it is not needed and that is
long in a disconnected situation in computer time) your connection.

I hope I answer your question a little bit with this.

Cor
<cr****@yahoo.c omschreef in bericht
news:11******** **************@ f1g2000cwa.goog legroups.com...
Hello All,

Some time ago, I implemented a data access layer that included a simple
connectin pool. At the time, I did it all by myself: I created N
connections, each connection associated with a worker thread that would
execute the db commands. The pool was fixed and all the connections
were created when the db access class was instantiated. The
connections remained opened during the whole execution. If a connection
was not available at the moment, then the request would block until one
connection was freed.

In my approach, I did not use the SQL server connection polling (I
actually disabled it in my connection strings).

That was done in c++ using ado. Now, I am in a position where I need to
implement a db access layer in .NET. I was wondering what kind of
support I can get from .NET.

I want to implement a similar model. I would appreciate if you could
weigh on my approach and on the ways to accomplish something similar in
ado.net. I would also appreciate your comments on the approach itself.

Thank you
CD

Dec 7 '06 #3
Hello Cor,

Thank you for your message.

You are correct. I am considering connection pooling at the client
side. I am aware of,and have used connection pooliing at the server
level as you describe below. In my case, for example, I open 10
connections and all of them remain open for the life of the
application. Each of them associated with a worker thread that executes
the client's db operations.

I know that this is very different from what I hear in general. Open a
connection for every transaction and close as soon as possible.
Nevertheless, I had some motivations for implementing this pooling at
the client side:

- The machine where SQL server was installed was shared with other
applications and I found easier to tune the cpu load by controlling the
throughput at the client side.
- I did not want my transaction to fail when the maximum size of the
pool was reached. This is the typical behavior when all connections in
the pool were being used.
- In some cases (when a failover occured, for example) I ended up with
"bogus" connections reenlisted in the pool. When those connections were
reused, the application would simply get stuck and had to be restarted.
The only way for me to eliminate this problem back then was to disable
connecion pooling at the server.
- By having all connections already open, I thought I would save some
time.

This was my experience. I am not saying that this is what I would like
to do again or whether these motivations are still valid with .NET. The
nature of my application might have been the difference: It was a
real-time video application.

The nature of the application that I want to implement now is a typical
client-server using .NET (no ASP, no WEB services, no Internet,
everything in the local network). The server will be very busy due to
the projected load of users (automatic and people).

Can you see any situation where my approach would be benefitial?
Am I just making things more complicated for me?
Do I gain anything for keeping the connections open?
Are my original motivatinons valid?

Your input is greatly appreciated.

Kind regards
Cassiano
Cor Ligthert [MVP] wrote:
CRB,

In my idea do you have another interpretation of Connection pooling than we,
you see it from your side of the application. Mostly by regulars here is
thought in the way the database is handling all connections it needs. AFAIK
is that set to 100, therefore often fair enough to handle all applications
in the same time as all connections are open (this can even be with more
ASPNet applications running). Therefore is than the advice to close as often
as possible (in other words all the time that it is not needed and that is
long in a disconnected situation in computer time) your connection.

I hope I answer your question a little bit with this.

Cor
<cr****@yahoo.c omschreef in bericht
news:11******** **************@ f1g2000cwa.goog legroups.com...
Hello All,

Some time ago, I implemented a data access layer that included a simple
connectin pool. At the time, I did it all by myself: I created N
connections, each connection associated with a worker thread that would
execute the db commands. The pool was fixed and all the connections
were created when the db access class was instantiated. The
connections remained opened during the whole execution. If a connection
was not available at the moment, then the request would block until one
connection was freed.

In my approach, I did not use the SQL server connection polling (I
actually disabled it in my connection strings).

That was done in c++ using ado. Now, I am in a position where I need to
implement a db access layer in .NET. I was wondering what kind of
support I can get from .NET.

I want to implement a similar model. I would appreciate if you could
weigh on my approach and on the ways to accomplish something similar in
ado.net. I would also appreciate your comments on the approach itself.

Thank you
CD
Dec 8 '06 #4
Hello Bill,

Thank you for your message.

No this will be a simple client-server application using .NET over a
local network without ASP or Windows Forms.

I would appreciate if you could comment on the reply I sent to "Cor" in
this thread.

Thank you
CD

William (Bill) Vaughn wrote:
I have a few thoughts:
1.. Is this a Windows Forms or ASP.NET application. The former does not really need a connection pooling mechanism as the entire app might be able to share a common connection.
2.. If it's ASP.NET, then it makes little sense to code, debug, test and deploy your own pooler. The code built into ADO.NET's .NET data providers should work fine.

--
_______________ _______________ ______
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
_______________ _______________ ____
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------

<cr****@yahoo.c omwrote in message news:11******** **************@ f1g2000cwa.goog legroups.com...
Hello All,

Some time ago, I implemented a data access layer that included a simple
connectin pool. At the time, I did it all by myself: I created N
connections, each connection associated with a worker thread that would
execute the db commands. The pool was fixed and all the connections
were created when the db access class was instantiated. The
connections remained opened during the whole execution. If a connection
was not available at the moment, then the request would block until one
connection was freed.

In my approach, I did not use the SQL server connection polling (I
actually disabled it in my connection strings).

That was done in c++ using ado. Now, I am in a position where I need to
implement a db access layer in .NET. I was wondering what kind of
support I can get from .NET.

I want to implement a similar model. I would appreciate if you could
weigh on my approach and on the ways to accomplish something similar in
ado.net. I would also appreciate your comments on the approach itself.

Thank you
CD
------=_NextPart_000_ 0008_01C7194F.0 0870D30
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-Google-AttachSize: 3690

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.5730.11" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=Arial size=2>I have a few thoughts:</FONT></DIV>
<OL>
<LI><FONT face=Arial size=2>Is this a Windows Forms or ASP.NET application.
The former does not really need a connection pooling mechanism as the entire
app might be able to share a common connection.</FONT></LI>
<LI><FONT face=Arial size=2>If it's ASP.NET, then it makes little sense to
code, debug, test and deploy your own pooler. The code built into ADO.NET's
.NET data providers should work fine. </FONT></LI></OL>
<DIV><BR><FON T face=Arial size=2>--
<BR>___________ _______________ __________<BR>W illiam (Bill) Vaughn<BR>Autho r,
Mentor, Consultant<BR>M icrosoft MVP<BR>INETA Speaker<BR></FONT><A
href="http://www.betav.com/blog/billva"><FONT face=Arial
size=2>www.beta v.com/blog/billva</FONT></A><BR><A
href="http://www.betav.com"> <FONT face=Arial
size=2>www.beta v.com</FONT></A><BR><FONT face=Arial size=2>Please reply only to
the newsgroup so that others can benefit.<BR>Thi s posting is provided "AS IS"
with no warranties, and confers no
rights.<BR>____ _______________ _______________ <BR>Visit </FONT><A
href="http://www.hitchhikerg uides.net"><FON T face=Arial
size=2>www.hitc hhikerguides.ne t</FONT></A><FONT face=Arial size=2to get more
information on my latest book:<BR>Hitchh iker's Guide to Visual Studio and SQL
Server (7th Edition)<BR>and Hitchhiker's Guide to SQL Server 2005 Compact
Edition
(EBook)<BR>-----------------------------------------------------------------------------------------------------------------------<BR></DIV></FONT>
<DIV><FONT face=Arial size=2>&lt;</FONT><A href="mailto:cr ****@yahoo.com" ><FONT
face=Arial size=2>cr****@y ahoo.com</FONT></A><FONT face=Arial size=2>&gt; wrote
in message </FONT><A
href="news:11** *************** *****@f1g2000cw a.googlegroups. com"><FONT
face=Arial
size=2>news:11* *************** ******@f1g2000c wa.googlegroups .com</FONT></A><FONT
face=Arial size=2>...</FONT></DIV><FONT face=Arial size=2>&gt; Hello
All,<BR>&gt; <BR>&gt; Some time ago, I implemented a data access layer that
included a simple<BR>&gt; connectin pool. At the time, I did it all by&nbsp;
myself: I created N<BR>&gt; connections, each connection associated with a
worker thread that would<BR>&gt; execute the db commands. The pool was fixed and
all the connections<BR> &gt; were created when the db access class was
instantiated.&n bsp; The<BR>&gt; connections remained opened during the whole
execution. If a connection<BR>& gt; was not available at the moment, then the
request would block until one<BR>&gt; connection was freed.<BR>&gt; <BR>&gt; In
my approach, I did not use the SQL server connection polling (I<BR>&gt; actually
disabled it in my connection strings).<BR>&g t; <BR>&gt; That was done in c++
using ado. Now, I am in a position where I need to<BR>&gt; implement a db access
layer in .NET. I was wondering what kind of<BR>&gt; support I can get from
.NET.<BR>&gt; <BR>&gt; I want to implement a similar model. I would appreciate
if you could<BR>&gt; weigh on my approach and on the ways to accomplish
something similar in<BR>&gt; ado.net. I would also appreciate your comments on
the approach itself.<BR>&gt; <BR>&gt; Thank you <BR>&gt;
CD<BR>&gt;</FONT></BODY></HTML>

------=_NextPart_000_ 0008_01C7194F.0 0870D30--
Dec 8 '06 #5
Hello Mark,

Please see my reply to "Cor" in ths thread.

Thank you
CD
Mark R. Dawson wrote:
Hi CD,
what extra functionality are you looking for that the standard connection
pooling in .Net does not give you?

Mark.
--
http://www.markdawson.org
"cr****@yahoo.c om" wrote:
Hello All,

Some time ago, I implemented a data access layer that included a simple
connectin pool. At the time, I did it all by myself: I created N
connections, each connection associated with a worker thread that would
execute the db commands. The pool was fixed and all the connections
were created when the db access class was instantiated. The
connections remained opened during the whole execution. If a connection
was not available at the moment, then the request would block until one
connection was freed.

In my approach, I did not use the SQL server connection polling (I
actually disabled it in my connection strings).

That was done in c++ using ado. Now, I am in a position where I need to
implement a db access layer in .NET. I was wondering what kind of
support I can get from .NET.

I want to implement a similar model. I would appreciate if you could
weigh on my approach and on the ways to accomplish something similar in
ado.net. I would also appreciate your comments on the approach itself.

Thank you
CD
Dec 8 '06 #6
Personally, I would *tend* to just use the inbuilt pooling in this
scenario, and just use the "open, use, close, dispose" model which in
turn uses the inbuilt pooling. To throttle the connections, I might put
a semaphore (or equivalent) around my DAL, such that only <xthreads
can be using the DAL. Assuming correct "close, dispose" steps, this
should effectively limit the connection size, and you may find that in
reality it uses *less* connections than your cap. You could even use a
shared semaphore (perhaps named using the server/db pair) to limit the
throughput per client (rather than per process/appdomain) - compared to
network IO the cost of a Win32 semaphore (as opposed to a .Net counter)
is negligible.
Re your bullets, I believe this addresses them:
- throttle: the semaphore
- failing on aquire: thread block on aquiring the semaphore [although
if you are hitting the pool limit it sounds like you are simply using
too many connections?]
- dead connections: hmmm... not sure how to "fix" this one; but
assuming you handle the immediate exception, does the connection not
de-pool itself after finding itself invalid?
- already open: they will be
Just my thoughts,

Marc

Dec 8 '06 #7
Hi crbd,
Can you see any situation where my approach would be benefitial?
No,
Am I just making things more complicated for me?
Very very much yes
Do I gain anything for keeping the connections open?
Yes more problems
Are my original motivatinons valid?
I cannot see but if it solved something it should be valid.

I hope this helps,

Cor

Dec 8 '06 #8
Let's review: (see >>>)

--
_______________ _______________ ______
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
_______________ _______________ ____
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------

<cr****@yahoo.c omwrote in message
news:11******** *************@l 12g2000cwl.goog legroups.com...
Hello Cor,

Thank you for your message.

You are correct. I am considering connection pooling at the client
side. I am aware of,and have used connection pooliing at the server
level as you describe below. In my case, for example, I open 10
connections and all of them remain open for the life of the
application. Each of them associated with a worker thread that executes
the client's db operations.
>As I've said many times before (and again in Chapter 9) opening one or
more connections on the client and holding them can work just fine--up to
a point. SS is capable of handling a lot of connections--each consumes
40-60K of memory and some CPU cycles. It makes no difference if you use
the Connection pool or not--the impact on the server with this approach
is the same. The process of opening (and closing) a connection does
consume client-side and server-side resources as the credentials are
revalidated and the connection state is reset.
>
I know that this is very different from what I hear in general. Open a
connection for every transaction and close as soon as possible.
Nevertheless, I had some motivations for implementing this pooling at
the client side:

- The machine where SQL server was installed was shared with other
applications and I found easier to tune the cpu load by controlling the
throughput at the client side.
- I did not want my transaction to fail when the maximum size of the
pool was reached. This is the typical behavior when all connections in
the pool were being used.
>>If you're filling a standard (100 connections) pool, there's something
wrong with your design. If each client is using that many connections, I
suspect that you have a recursion problem or something wrong with your
mechanism that manages your pooler.
- In some cases (when a failover occured, for example) I ended up with
"bogus" connections reenlisted in the pool. When those connections were
reused, the application would simply get stuck and had to be restarted.
The only way for me to eliminate this problem back then was to disable
connecion pooling at the server.
- By having all connections already open, I thought I would save some
time.
>>The ADO.NET 2.0 pooler is a lot smarter about handling connections post
failover. The old one was not. It also permits you to flush the pool
manually.
>
This was my experience. I am not saying that this is what I would like
to do again or whether these motivations are still valid with .NET. The
nature of my application might have been the difference: It was a
real-time video application.
>>Ah... yes.
>
The nature of the application that I want to implement now is a typical
client-server using .NET (no ASP, no WEB services, no Internet,
everything in the local network). The server will be very busy due to
the projected load of users (automatic and people).

Can you see any situation where my approach would be benefitial?
>>I would have to see more of the overall design to make that call.
Am I just making things more complicated for me?
>>Perhaps...
Do I gain anything for keeping the connections open?
>>Yes. Less overhead but no, less scalability (once you reach the server's
limit)
Are my original motivatinons valid?

Your input is greatly appreciated.

Kind regards
Cassiano
Cor Ligthert [MVP] wrote:
>CRB,

In my idea do you have another interpretation of Connection pooling than
we,
you see it from your side of the application. Mostly by regulars here is
thought in the way the database is handling all connections it needs.
AFAIK
is that set to 100, therefore often fair enough to handle all
applications
in the same time as all connections are open (this can even be with more
ASPNet applications running). Therefore is than the advice to close as
often
as possible (in other words all the time that it is not needed and that
is
long in a disconnected situation in computer time) your connection.

I hope I answer your question a little bit with this.

Cor
<cr****@yahoo. comschreef in bericht
news:11******* *************** @f1g2000cwa.goo glegroups.com.. .
Hello All,

Some time ago, I implemented a data access layer that included a simple
connectin pool. At the time, I did it all by myself: I created N
connections, each connection associated with a worker thread that would
execute the db commands. The pool was fixed and all the connections
were created when the db access class was instantiated. The
connections remained opened during the whole execution. If a connection
was not available at the moment, then the request would block until one
connection was freed.

In my approach, I did not use the SQL server connection polling (I
actually disabled it in my connection strings).

That was done in c++ using ado. Now, I am in a position where I need to
implement a db access layer in .NET. I was wondering what kind of
support I can get from .NET.

I want to implement a similar model. I would appreciate if you could
weigh on my approach and on the ways to accomplish something similar in
ado.net. I would also appreciate your comments on the approach itself.

Thank you
CD

Dec 8 '06 #9
Hello Bill,

Thank you for your detailed reply.

Based on your response, maybe the only advantage of keeping the
connections to the db open for the life of the application would be to
avoid the delay of opening and closing the connection. Without caching,
this would be prohibitive, of course. With caching, I immagine that the
time to open and close is significantly reduce. I wonder, however if
this time would still compund significantly in the case of applications
that interact with the db with a very high frequency. For instance, my
application is driven by an (multithreaded) automatic process that can
issue more that 100 transactions/second (sustained). Would the compound
cost of opening/closing/ the connection in this scenario justify my
idea of keeping a pool of open connections at the client ? So, the
question at the center of my problem is:"What is the cost for
opening/executing/closing a connection in the case caching is used?"

Thank you
CD

William (Bill) Vaughn wrote:
Let's review: (see >>>)

--
_______________ _______________ ______
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
_______________ _______________ ____
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------

<cr****@yahoo.c omwrote in message
news:11******** *************@l 12g2000cwl.goog legroups.com...
Hello Cor,

Thank you for your message.

You are correct. I am considering connection pooling at the client
side. I am aware of,and have used connection pooliing at the server
level as you describe below. In my case, for example, I open 10
connections and all of them remain open for the life of the
application. Each of them associated with a worker thread that executes
the client's db operations.
As I've said many times before (and again in Chapter 9) opening one or
more connections on the client and holding them can work just fine--up to
a point. SS is capable of handling a lot of connections--each consumes
40-60K of memory and some CPU cycles. It makes no difference if you use
the Connection pool or not--the impact on the server with this approach
is the same. The process of opening (and closing) a connection does
consume client-side and server-side resources as the credentials are
revalidated and the connection state is reset.

I know that this is very different from what I hear in general. Open a
connection for every transaction and close as soon as possible.
Nevertheless, I had some motivations for implementing this pooling at
the client side:

- The machine where SQL server was installed was shared with other
applications and I found easier to tune the cpu load by controlling the
throughput at the client side.
- I did not want my transaction to fail when the maximum size of the
pool was reached. This is the typical behavior when all connections in
the pool were being used.
>If you're filling a standard (100 connections) pool, there's something
wrong with your design. If each client is using that many connections, I
suspect that you have a recursion problem or something wrong with your
mechanism that manages your pooler.
- In some cases (when a failover occured, for example) I ended up with
"bogus" connections reenlisted in the pool. When those connections were
reused, the application would simply get stuck and had to be restarted.
The only way for me to eliminate this problem back then was to disable
connecion pooling at the server.
- By having all connections already open, I thought I would save some
time.
>The ADO.NET 2.0 pooler is a lot smarter about handling connections post
failover. The old one was not. It also permits you to flush the pool
manually.


This was my experience. I am not saying that this is what I would like
to do again or whether these motivations are still valid with .NET. The
nature of my application might have been the difference: It was a
real-time video application.
>Ah... yes.

The nature of the application that I want to implement now is a typical
client-server using .NET (no ASP, no WEB services, no Internet,
everything in the local network). The server will be very busy due to
the projected load of users (automatic and people).

Can you see any situation where my approach would be benefitial?
>I would have to see more of the overall design to make that call.
Am I just making things more complicated for me?
>Perhaps...
Do I gain anything for keeping the connections open?
>Yes. Less overhead but no, less scalability (once you reach the server's
limit)
Are my original motivatinons valid?

Your input is greatly appreciated.

Kind regards
Cassiano
Cor Ligthert [MVP] wrote:
CRB,

In my idea do you have another interpretation of Connection pooling than
we,
you see it from your side of the application. Mostly by regulars here is
thought in the way the database is handling all connections it needs.
AFAIK
is that set to 100, therefore often fair enough to handle all
applications
in the same time as all connections are open (this can even be with more
ASPNet applications running). Therefore is than the advice to close as
often
as possible (in other words all the time that it is not needed and that
is
long in a disconnected situation in computer time) your connection.

I hope I answer your question a little bit with this.

Cor
<cr****@yahoo.c omschreef in bericht
news:11******** **************@ f1g2000cwa.goog legroups.com...
Hello All,

Some time ago, I implemented a data access layer that included a simple
connectin pool. At the time, I did it all by myself: I created N
connections, each connection associated with a worker thread that would
execute the db commands. The pool was fixed and all the connections
were created when the db access class was instantiated. The
connections remained opened during the whole execution. If a connection
was not available at the moment, then the request would block until one
connection was freed.

In my approach, I did not use the SQL server connection polling (I
actually disabled it in my connection strings).

That was done in c++ using ado. Now, I am in a position where I need to
implement a db access layer in .NET. I was wondering what kind of
support I can get from .NET.

I want to implement a similar model. I would appreciate if you could
weigh on my approach and on the ways to accomplish something similar in
ado.net. I would also appreciate your comments on the approach itself.

Thank you
CD
Dec 11 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1763
by: Mahesh D. Rane | last post by:
Hi, I am connecting to sql databse from windows C# form. when i close the form, then also the connection to databse is active. Its not allowing me to delete the database. But if i close the complete application, then databse is delete successfully. ANy solution ? Regards,
18
3246
by: Rob Nicholson | last post by:
We're getting an occasional occurrence of the following error when two users try and open the same record in our ASP.NET app: "There is already an open DataReader associated with this Connection which must be closed first." As suggested, I was closing the connection in the Finally part of the outer Try but I wasn't closing the data reader as well so I assume that if the following happens, the above error could occur
1
5726
by: Lenny Shprekher | last post by:
Hi, I am getting issues that Oracle collecting opened sessions (connections) from my webservice using regular System.Data.OleDb.OleDbConnection object. I am guessing that this is connection pooling issue. Is there is any way to disable connection pooling for one particular .net webservice? Thanks, Leonid
5
7355
by: Zlatko Matiæ | last post by:
Hello. In ODBC Data Source Administrator, there is a tab "Connection Pooling" and option "PerfMon" Enable/Disable. Could someone explain the meaning of the option and how it reflects to Access when having ODBC linked tables, JET queries on linked tables and pass-through queries? Thanks,
1
1255
by: PH | last post by:
Hi; I got an application written in ASP.NET (VB.NET and C#) that uses connection pooling. The Max connections defined in the connection command are 50, and there are no more than 3 or 4 user using the application (intranet). I very carefully open the connections in the LOAD event and close them in the PreRender event. Usually I got only one connection opened per FORM.
20
3291
by: fniles | last post by:
I am using VS2003 and connecting to MS Access database. When using a connection pooling (every time I open the OLEDBCONNECTION I use the exact matching connection string), 1. how can I know how many connection has been used ? 2. If the maximum pool size has been reached, what happens when I call the method Open to open the connection ? Will I get an error ? MSDN says the request is queued, but will I get an error in the open method ? ...
3
4890
by: fniles | last post by:
In the Windows application (using VB.NET 2005) I use connection pooling like the following: In the main form load I open a connection using a connection string that I stored in a global variable g_sConnectionString and leave this connection open and not close it until it exits the application. Then on each thread/each subsequent sub that needs the connection I create a local OleDBConnection variable, open the connection using the exact...
0
6612
viswarajan
by: viswarajan | last post by:
Introduction This article is to go in deep in dome key features in the ADO.NET 2 which was shipped with VS 2005. In this article I will go trough one of the key features which is the Connection Pooling. This feature is a key feature plays an important role in the performance in most of business application or Data driven application. What's Connection Pooling?
4
1339
by: laziers | last post by:
Hi there Anybody knows what is the best way to manage creation 2000 of the database connections at the same time? Now Im doing it somethink like this: using ( Connection conn = Connection.Create ) { conn.Open(); //...
0
8767
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9428
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9163
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8168
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6722
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6028
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4537
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3246
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2702
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.