sql 超时间问题
我使用以下sqlhelper代码:
public SqlConnection GetCon()
{
Str_Connectionstring = "";
conn = new SqlConnection(Str_Connectionstring);
conn.Open();
return conn;
}
public bool GetExecute(string cmdtext)
{
S_Com = new SqlCommand(cmdtext, GetCon());
try
{
S_Com.ExecuteNonQuery();
this.conn.Close();
this.conn.Dispose();
return true;
}
catch (Exception ex)
{
MessageBox.Show("错误:" + ex.Message, "错误提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
return false;
}
finally
{
if (GetCon().State == ConnectionState.Open)
{
GetCon().Close();
GetCon().Dispose();
}
}
}
当我执行该语句的语句的时候,400-500条的时候就显示超时间。
sql sp_who2 链接数130
该如何解决呢?