Added Command Timeout to each query that did not have a specified timeout

This commit is contained in:
Rich
2017-03-01 15:42:00 +00:00
parent b5f4a0751e
commit 32cf8e2f3c
49 changed files with 315 additions and 0 deletions

View File

@@ -1053,6 +1053,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "addRODb";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@ROName", _ROName);
@@ -1098,6 +1099,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "addRODb";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@ROName", rOName);
@@ -1162,6 +1164,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "updateRODb";
// All Fields including Calculated Fields
cm.Parameters.AddWithValue("@RODbID", _RODbID);
@@ -1222,6 +1225,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "updateRODb";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@RODbID", rODbID);
@@ -1264,6 +1268,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "deleteRODb";
cm.Parameters.AddWithValue("@RODbID", criteria.RODbID);
cm.ExecuteNonQuery();
@@ -1286,6 +1291,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "deleteRODb";
// Input PK Fields
cm.Parameters.AddWithValue("@RODbID", rODbID);
@@ -1338,6 +1344,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "existsRODb";
cm.Parameters.AddWithValue("@RODbID", _RODbID);
int count = (int)cm.ExecuteScalar();