Click here to Skip to main content
15,895,011 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to create a C# Application which can automatically install an Application or server ? Pin
Rahul Sarkar10-Feb-13 6:58
Rahul Sarkar10-Feb-13 6:58 
AnswerRe: How to create a C# Application which can automatically install an Application or server ? Pin
Jegan Thiyagesan13-Feb-13 2:52
Jegan Thiyagesan13-Feb-13 2:52 
QuestionC# connection pooling Pin
classy_dog9-Feb-13 21:52
classy_dog9-Feb-13 21:52 
AnswerRe: C# connection pooling Pin
N a v a n e e t h10-Feb-13 3:19
N a v a n e e t h10-Feb-13 3:19 
GeneralRe: C# connection pooling Pin
PIEBALDconsult10-Feb-13 4:51
mvePIEBALDconsult10-Feb-13 4:51 
GeneralRe: C# connection pooling Pin
jschell10-Feb-13 8:10
jschell10-Feb-13 8:10 
GeneralRe: C# connection pooling Pin
PIEBALDconsult10-Feb-13 17:02
mvePIEBALDconsult10-Feb-13 17:02 
AnswerRe: C# connection pooling Pin
jschell10-Feb-13 8:28
jschell10-Feb-13 8:28 
classy_dog wrote:
1. when do you recommend connection pooling be setup?


Unless you have explicitly changed the connection configuration in your connection url then pooling always exists in C#/.Net.

classy_dog wrote:
2. Does it make a difference if this connection pooling is a web, desktop, console or some other C# application?


They behavior of the application makes a difference. For example generally it is pointless to have a pool in a standalone client application. And if one expects a lot of stand alone client applications then it could actually be a detriment. For low volume servers pools provide no benefit.

For high volume servers a pool might increase the overall tps (transactions per second). Whether that increase is significant is another matter. It depends on actual usage. However it will often have some positive impact.

There is a downside to pooling in that you must understand the limitations as well as understand how it behaves. For example if you have 100 active connections in the pool and the database is bounced, then you have 100 stale connections. Consequently those will result in 100 exceptions when you attempt to use them because the pool does not test them before giving them to you. And there is a very good reason for not testing them because doing so would basically incur the same cost as creating the connection in the first place as well as not providing any surety that when you use the connection that it still wouldn't be stale (because the database might be bounced after the test and before use.)

classy_dog wrote:
3. Can you point me to a reference and or some me some code how to setup the connection pooling?


As noted the connection pool is already set up.

If you wish to tune it for your application(s) then you can modify the url. That is documented in the following.

http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring.aspx[^]


Keep in mind that you can have different urls to the same database. Each connection string represents a different pool.

If you want to attempt to deal with the stale pool problem then look to the SqlConnection.SqlConnection.ClearAllPools() method.
QuestionProtocol Handler C# Pin
thomas mason9-Feb-13 15:44
thomas mason9-Feb-13 15:44 
AnswerRe: Protocol Handler C# Pin
Jibesh9-Feb-13 18:59
professionalJibesh9-Feb-13 18:59 
AnswerRe: Protocol Handler C# Pin
N a v a n e e t h10-Feb-13 2:44
N a v a n e e t h10-Feb-13 2:44 
AnswerRe: Protocol Handler C# Pin
Eddy Vluggen10-Feb-13 6:08
professionalEddy Vluggen10-Feb-13 6:08 
GeneralRe: Protocol Handler C# Pin
thomas mason10-Feb-13 16:11
thomas mason10-Feb-13 16:11 
AnswerRe: Protocol Handler C# Pin
classy_dog10-Feb-13 16:51
classy_dog10-Feb-13 16:51 
AnswerRe: Protocol Handler C# Pin
José Amílcar Casimiro11-Feb-13 3:17
José Amílcar Casimiro11-Feb-13 3:17 
QuestionTableAdapter.Update() doen't work Pin
fheyn9-Feb-13 11:06
fheyn9-Feb-13 11:06 
AnswerRe: TableAdapter.Update() doen't work Pin
OriginalGriff9-Feb-13 11:53
mveOriginalGriff9-Feb-13 11:53 
AnswerRe: TableAdapter.Update() doen't work Pin
Muthuraja Irullandi10-Feb-13 0:09
Muthuraja Irullandi10-Feb-13 0:09 
Questionmultiplication Pin
abhishek9111199-Feb-13 7:35
abhishek9111199-Feb-13 7:35 
AnswerRe: multiplication Pin
Eddy Vluggen9-Feb-13 8:23
professionalEddy Vluggen9-Feb-13 8:23 
GeneralRe: multiplication Pin
PIEBALDconsult9-Feb-13 10:27
mvePIEBALDconsult9-Feb-13 10:27 
GeneralRe: multiplication Pin
abhishek9111199-Feb-13 16:55
abhishek9111199-Feb-13 16:55 
GeneralRe: multiplication Pin
Jibesh9-Feb-13 19:07
professionalJibesh9-Feb-13 19:07 
GeneralRe: multiplication Pin
abhishek9111199-Feb-13 19:21
abhishek9111199-Feb-13 19:21 
GeneralRe: multiplication Pin
Jibesh9-Feb-13 19:23
professionalJibesh9-Feb-13 19:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.