Click here to Skip to main content
15,891,136 members
Home / Discussions / C#
   

C#

 
GeneralRe: How know the state connected for udp client Pin
hasan hadi7-May-15 3:17
hasan hadi7-May-15 3:17 
AnswerRe: How know the state connected for udp client Pin
F-ES Sitecore6-May-15 23:28
professionalF-ES Sitecore6-May-15 23:28 
GeneralRe: How know the state connected for udp client Pin
hasan hadi6-May-15 23:35
hasan hadi6-May-15 23:35 
AnswerRe: How know the state connected for udp client Pin
hasan hadi10-May-15 16:12
hasan hadi10-May-15 16:12 
QuestionSQL Server Connection Best Practice Pin
JBHowl6-May-15 8:58
JBHowl6-May-15 8:58 
AnswerRe: SQL Server Connection Best Practice Pin
Richard Deeming6-May-15 9:28
mveRichard Deeming6-May-15 9:28 
AnswerRe: SQL Server Connection Best Practice Pin
Dave Kreskowiak6-May-15 11:11
mveDave Kreskowiak6-May-15 11:11 
AnswerRe: SQL Server Connection Best Practice Pin
F-ES Sitecore6-May-15 22:39
professionalF-ES Sitecore6-May-15 22:39 
As already mentioned, creating the connection when you need it is best. ado.net implements connection pooling for you under the covers so although you are opening and closing the connection, in normal operation you're not actually doing anything...when you close in your code ado.net keeps the connection open and adds it to the pool, when you open it is just retrieved from the pool so you're not consuming any resources or creating overhead by repeatedly opening and closing. However it means that when your server is very busy then it allows other processes to use the connection if needed and you might get a different connection, or again as mentioned if the connection breaks for some reason you'll just get a new one.

So, basically, don't worry about rapidly opening and closing connections in terms of resources or overhead, ado.net's connection pooling is helping you out.

QuestionCreating Large, Blank Bitmaps Pin
JBHowl6-May-15 3:39
JBHowl6-May-15 3:39 
AnswerRe: Creating Large, Blank Bitmaps Pin
Dave Kreskowiak6-May-15 4:15
mveDave Kreskowiak6-May-15 4:15 
GeneralRe: Creating Large, Blank Bitmaps Pin
JBHowl6-May-15 4:41
JBHowl6-May-15 4:41 
GeneralRe: Creating Large, Blank Bitmaps Pin
Eddy Vluggen6-May-15 5:14
professionalEddy Vluggen6-May-15 5:14 
GeneralRe: Creating Large, Blank Bitmaps Pin
Dave Kreskowiak6-May-15 11:07
mveDave Kreskowiak6-May-15 11:07 
AnswerRe: Creating Large, Blank Bitmaps Pin
Pete O'Hanlon6-May-15 5:00
mvePete O'Hanlon6-May-15 5:00 
GeneralRe: Creating Large, Blank Bitmaps Pin
JBHowl6-May-15 5:03
JBHowl6-May-15 5:03 
GeneralRe: Creating Large, Blank Bitmaps Pin
Pete O'Hanlon6-May-15 8:50
mvePete O'Hanlon6-May-15 8:50 
AnswerRe: Creating Large, Blank Bitmaps Pin
OriginalGriff6-May-15 6:14
mveOriginalGriff6-May-15 6:14 
GeneralRe: Creating Large, Blank Bitmaps Pin
JBHowl6-May-15 7:16
JBHowl6-May-15 7:16 
QuestionHow can I use webcam in WebBrowser Control? Pin
Member 116126625-May-15 17:45
Member 116126625-May-15 17:45 
AnswerRe: How can I use webcam in WebBrowser Control? Pin
Dr Gadgit6-May-15 2:14
Dr Gadgit6-May-15 2:14 
QuestionC# Get Audio File From Resources Pin
Kevin Marois5-May-15 9:03
professionalKevin Marois5-May-15 9:03 
AnswerRe: C# Get Audio File From Resources Pin
Sascha Lefèvre5-May-15 10:28
professionalSascha Lefèvre5-May-15 10:28 
GeneralRe: C# Get Audio File From Resources Pin
Kevin Marois5-May-15 10:50
professionalKevin Marois5-May-15 10:50 
GeneralRe: C# Get Audio File From Resources Pin
Sascha Lefèvre5-May-15 11:02
professionalSascha Lefèvre5-May-15 11:02 
GeneralRe: C# Get Audio File From Resources Pin
Kevin Marois5-May-15 11:05
professionalKevin Marois5-May-15 11:05 

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.