davidrobin
Jul 29th, 2004, 05:50 AM
I have written an intranet site with about 8 pages. Each page creates a new class (contained in a class library), in the class a connection to SQL server is created.
The class also has a public sub as follows Public Overridable Sub CloseConnection()
If conConnect.State <> ConnectionState.Closed Then conConnect.Close()
conConnect.Dispose()
End Subwhich can be called from class instance on each page.
The problem is after browsing each page once there are a list of 11 connections (Enterprise Manager > server > Management > Current Activity > Process Info) for .Net SqlClient Data Provider (application column) and I have to kill them.
Is there some way of ensuring connections get closed. We have 800ish staff and that is a lot of connections.
The class also has a public sub as follows Public Overridable Sub CloseConnection()
If conConnect.State <> ConnectionState.Closed Then conConnect.Close()
conConnect.Dispose()
End Subwhich can be called from class instance on each page.
The problem is after browsing each page once there are a list of 11 connections (Enterprise Manager > server > Management > Current Activity > Process Info) for .Net SqlClient Data Provider (application column) and I have to kill them.
Is there some way of ensuring connections get closed. We have 800ish staff and that is a lot of connections.