[英]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.