Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SqlConnection Pooling and SQL 7.0

0 views
Skip to first unread message

Eric Gurney

unread,
Sep 23, 2009, 8:40:18 AM9/23/09
to
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


0 new messages