Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code英文就不要你们翻译了 别废话SQL连接池问题 求解
我返回的是datatable 是自动释放对象的
C# code
DataTable table = SqlHelper.ExecuteDataTable(sql, CommandType.StoredProcedure, para)
为什么 还有连接池过大的问题???我找到了规律 页面连续刷新3次以后 当第4次刷新时 就会出现上面错误
我返回的是datatable 是自动释放对象的
C# code
DataTable table = SqlHelper.ExecuteDataTable(sql, CommandType.StoredProcedure, para)
为什么 还有连接池过大的问题???我找到了规律 页面连续刷新3次以后 当第4次刷新时 就会出现上面错误
来进行查询 按道理说 不会出现连接数过多啊? 我源代码 找了N次了 没看到有错的地方 /// <summary>
/// 根据 isActive 字段查询表 rm_Project 的数据
/// </summary>
/// <param name="isActive">字段</param>
/// <returns></returns>
public static IList<RiskMatrix_rm_Project> list(string isActive)
{
IList<RiskMatrix_rm_Project> list = new List<RiskMatrix_rm_Project>();
string sql = "pro_rm_Project_isActive";
bool Active = Convert.ToBoolean(isActive);
SqlParameter[] para = new SqlParameter[]
{
new SqlParameter("@isActive",Active)
};
DataTable table = SqlHelper.ExecuteDataTable(sql, CommandType.StoredProcedure, para);
foreach (DataRow item in table.Rows)
{
RiskMatrix_rm_Project project = new RiskMatrix_rm_Project();
project.projectRNO = Convert.ToInt32(item["projectRNO"]);
project.projectname = Convert.ToString(item["projectname"]);
project.isrestricted = Convert.ToString(item["isrestricted"]);
project.probabilityscale = Convert.ToInt32(item["probabilityscale"]);
project.impactscale = Convert.ToInt32(item["impactscale"]);
project.manageabilityscale = Convert.ToInt32(item["manageabilityscale"]);
project.riskscale = Convert.ToInt32(item["riskscale"]);
project.createddate = Convert.ToString(item["createddate"]);
project.status = Convert.ToInt32(item["status"]);
project.isActive = Convert.ToString(item["isActive"]);
project.ArchiveDate = Convert.ToString(item["ArchiveDate"]);
project.ArchivedBy = Convert.ToString(item["ArchivedBy"]);
list.Add(project);
}
return list;
}