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

@@ -900,6 +900,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "addROImage";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@RODbID", RODbID);
@@ -942,6 +943,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "addROImage";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@RODbID", myRODb.RODbID);
@@ -1007,6 +1009,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "updateROImage";
// All Fields including Calculated Fields
cm.Parameters.AddWithValue("@ImageID", _ImageID);
@@ -1061,6 +1064,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "updateROImage";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@ImageID", imageID);
@@ -1103,6 +1107,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "deleteROImage";
cm.Parameters.AddWithValue("@ImageID", criteria.ImageID);
cm.ExecuteNonQuery();
@@ -1125,6 +1130,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "deleteROImage";
// Input PK Fields
cm.Parameters.AddWithValue("@ImageID", imageID);
@@ -1177,6 +1183,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "existsROImage";
cm.Parameters.AddWithValue("@ImageID", _ImageID);
int count = (int)cm.ExecuteScalar();