110,536
社区成员
发帖
与我相关
我的任务
分享
string connStr = String.Format("server={0};user id={1}; password={2}; database={3}; pooling=false",@"192.168.8.196", @"robot", @"robot", @"robot");
using(conn = new MySqlConnection(connStr))
{
//Open the connection
conn.Open();
//Do somthing useful
}
换这个语句吧,应用线程池的事情,不关你事,你不要管。正常情况下出现连接数不够用的情况也不是你的事情,就好像公交车就是那么大,只能挤上去100个,你非要挤上去200个那是不可能的,剩下的100个只能。。。等。