经测试,sql2005 只能最多打开223个连接,就抛异常了!
for (int i = 0; i < 10000; i++)
{
AttachDbFilename = ""E:\DB\NORTHWND.mdf"";
Integrated Security = True;Connect Timeout = 30 ; User Instance = True");
conn. Open ();
Console.WriteLine("打开了{ 0 }个连接", i);
}
经测试,sql2005 只能最多打开223个连接,就抛异常了!
for (int i = 0; i < 10000; i++)
{
}