判断SqlConnection连接是否关闭
SqlConnection conn =
new
SqlConnection(conStr);
// 如果是关闭状态
if
(conn.State == System.Data.ConnectionState.Closed) {
conn.Open();
}
SqlConnection conn =
new
SqlConnection(conStr);
// 如果是关闭状态
if
(conn.State == System.Data.ConnectionState.Closed) {
conn.Open();
}