More than 1 connection

janilane

Active member
Joined
Jan 23, 2008
Messages
30
Programming Experience
Beginner
Hi,

What's the effect of having 1 connection for each datareader? I have 4 datareaders, 1 connection for each.

Thanks
 
It's not really a problem although it's probably unnecessary. If you are only reading from one DataReader at a time then you only need one connection. If you're reading from all four at the same time then your app probably needs a redesign.
 
Hi,

What's the effect of having 1 connection for each datareader? I have 4 datareaders, 1 connection for each.

Thanks

.NET does connection pooling anyway. You think you have 4 connections, but the actual number established to the database depends on the number of parallel threads doing database work..

Assumption: you are using the same conenction string for all connections
 
Back
Top