R
Ramon de Klein
We use an automated testing tool and I restore the
database before each testcase that modifies the database.
Therefore I need to kill all open connections to the SQL-
Server database (using the T-SQL KILL statement).
Unfortunately, the SQL connection pool isn't notified that
the connection is cancelled. So when a new connection is
opened (that is retrieved from the pool) a 'General
Network Error' occurs.
I have solved this to disable connection pooling while
testing (setting "pooling='false'" in the connection
string). I would rather flush the connection pool, but I
cannot find a way to do this from a .NET environment.
Does anyone know how to manage the connection pool from
within a .NET application?
database before each testcase that modifies the database.
Therefore I need to kill all open connections to the SQL-
Server database (using the T-SQL KILL statement).
Unfortunately, the SQL connection pool isn't notified that
the connection is cancelled. So when a new connection is
opened (that is retrieved from the pool) a 'General
Network Error' occurs.
I have solved this to disable connection pooling while
testing (setting "pooling='false'" in the connection
string). I would rather flush the connection pool, but I
cannot find a way to do this from a .NET environment.
Does anyone know how to manage the connection pool from
within a .NET application?