bsp; protected override bool ValiDate(SqlConnection t)
{
try
{
return !(t.State.Equals(ConnectionState.Closed));
}
catch (SqlException)
{
return false;
}
}
/// <summary>
/// 关闭数据库连接
/// </summary>
/// <param name="t">数据库连接对象</param>
protected override void Expire(SqlConnection t)
{
try
{
if (t.State == ConnectionState.Open)
{
t.Close();
}
}
catch (SqlException)
{
}
}
/// <summary>
/// 从池中获取数据库连接
/// </summary>
/// <returns>数据库连接对象</returns>
public SqlConnection BorrowDBConn()
{
try
{
return base.GetObjectFromPool();