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

@@ -1087,6 +1087,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "addFormat";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@ParentID", ParentID);
@@ -1133,6 +1134,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "addFormat";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@ParentID", myParent.FormatID);
@@ -1198,6 +1200,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "updateFormat";
// All Fields including Calculated Fields
cm.Parameters.AddWithValue("@FormatID", _FormatID);
@@ -1269,6 +1272,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "updateFormat";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@FormatID", formatID);
@@ -1312,6 +1316,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "deleteFormat";
cm.Parameters.AddWithValue("@FormatID", criteria.FormatID);
cm.ExecuteNonQuery();
@@ -1334,6 +1339,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "deleteFormat";
// Input PK Fields
cm.Parameters.AddWithValue("@FormatID", formatID);
@@ -1386,6 +1392,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "existsFormat";
cm.Parameters.AddWithValue("@FormatID", _FormatID);
int count = (int)cm.ExecuteScalar();