dbTalk Databases Forums  

SqlConnection Pooling and SQL 7.0

microsoft.public.sqlserver.clients microsoft.public.sqlserver.clients


Discuss SqlConnection Pooling and SQL 7.0 in the microsoft.public.sqlserver.clients forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Eric Gurney
 
Posts: n/a

Default 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

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.