Search This Blog

Wednesday, February 1, 2012

How can increase command time out.

ExecuteNonQuery(SqlConnection conn, CommandType cmdType, string cmdText, params SqlParameter[] cmdParameters)
{
SqlCommand cmd = new SqlCommand();
cmd.CommandTimeout =60000;PrepareCommand(cmd, conn, cmdType, cmdText, cmdParameters);
int val = cmd.ExecuteNonQuery();
cmd.Parameters.Clear();
return val;
}

No comments :