SqlConnection Pooling and SQL 7.0 -
09-23-2009
, 07:40 AM
I'm working with a legacy database, writing some testing routines against an
old SQL 7.0 database.
I've boiled the code down to:
for(int loop = 0; loop < 4000; loop++)
{
using (SqlConnection c = new SqlConnection(cs.ToString())
{
c.Open();
c.Close();
}
}
I'm getting connection errors:
Verify that the instance name is correct and that SQL Server is configured
to allow remote connections. (provider: TCP Provider, error: 0 - Only one
usage of each socket address (protocol/network address/port) is normally
permitted.
after many opens and closes of the connection.
To me it seems that connection pooling is not working. If I change the DB
to a 2005 DB, the code works fine.
Any ideas why Connection Pooling wouldn't be working for SQL Server 7.0?
Thanks,
Eric |