[英]Will connection leak might Cause Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool?
[英]Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool issues even If I used using statement
包装在 sql 连接中。 这是例子
using (SqlConnection conn = new SqlConnection(ConfigurationManager.AppSettings["connectionString"]))
{
conn.Open();
using (SqlCommand cmd1 = new SqlCommand($"truncate table tablename", conn))
{
dr = cmd1.ExecuteReader();
}
dr.Close();
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.