G
Guest
Hi;
We have a case where it is virtually impossible to know when to close a
connection because we may be about to make another query. So...
1) By any chance does SqlConnection implement pooling under the covers so
multiple calls to new SqlConnection()/sc.Close() are fast?
2) If I just hold on to a connection for a long time, is there any downside
to that - as long as it is one connection total for my app?
Also, when I pass a connection to SqlDataAdapter.SelectCommand = new
SqlCommand(select, connection), what happens to that connection? Am I
supposed to close it or close the SqlDataAdapter object?
We have a case where it is virtually impossible to know when to close a
connection because we may be about to make another query. So...
1) By any chance does SqlConnection implement pooling under the covers so
multiple calls to new SqlConnection()/sc.Close() are fast?
2) If I just hold on to a connection for a long time, is there any downside
to that - as long as it is one connection total for my app?
Also, when I pass a connection to SqlDataAdapter.SelectCommand = new
SqlCommand(select, connection), what happens to that connection? Am I
supposed to close it or close the SqlDataAdapter object?