SQLserver找出执行慢的SQL语句
来源:才华咖 阅读:5.93K 次
复制代码 代码如下:
///
/// 批量执行SQL语句
///
///SQL语句数组
///SQL参数对象数组
///
public static Int32 ExecuteSqls(String[] Sqlstr, Listparam)
{
String ConnStr = GetSqlConnection();
using (SqlConnection conn = new SqlConnection(ConnStr))
{
SqlCommand cmd = new SqlCommand();
SqlTransaction tran = null;
saction = tran;
try
{
();
tran = nTransaction();
ection = conn;
saction = tran;
Int32 count = th;
for (Int32 i = 0; i < count; i++)
{
andText = Sqlstr[i];
ange(param[i]);
uteNonQuery();
}
it();
return 1;
}
catch
{
back();
return 0;
}
finally
{
ose();
e();
}
}
}
热门内容
大家都在看
最近更新