Added Command Timeout to each query that did not have a specified timeout
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user