O
Oenone
I have an application that connects using SqlConnection objects to a SQL
Server database.
When I first execute the Connection.Open() method, two new connections
appear in my database (according to sp_who2, both of them are from the
program ".Net SqlClient Data Provider"). Firstly, is it normal for two
connections to appear like this?
Anyway, straight after opening the database I call Connection.Close().
Neither of the connections in the database close at this point. Is this the
expected behaviour? I'm wondering whether this is just due to connection
pooling and is nothing to worry about but would like some confirmation.
Calling the .Dispose method on the connection has no effect either.
The connections don't disappear from the database until I close my
application and return to the IDE.
My thanks in advance for any guidance anyone can provide.
Server database.
When I first execute the Connection.Open() method, two new connections
appear in my database (according to sp_who2, both of them are from the
program ".Net SqlClient Data Provider"). Firstly, is it normal for two
connections to appear like this?
Anyway, straight after opening the database I call Connection.Close().
Neither of the connections in the database close at this point. Is this the
expected behaviour? I'm wondering whether this is just due to connection
pooling and is nothing to worry about but would like some confirmation.
Calling the .Dispose method on the connection has no effect either.
The connections don't disappear from the database until I close my
application and return to the IDE.
My thanks in advance for any guidance anyone can provide.