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

@@ -890,6 +890,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "addConnection";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@Name", _Name);
@@ -933,6 +934,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "addConnection";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@Name", name);
@@ -998,6 +1000,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "updateConnection";
// All Fields including Calculated Fields
cm.Parameters.AddWithValue("@DBID", _DBID);
@@ -1053,6 +1056,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "updateConnection";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@DBID", dbid);
@@ -1096,6 +1100,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "deleteConnection";
cm.Parameters.AddWithValue("@DBID", criteria.DBID);
cm.ExecuteNonQuery();
@@ -1118,6 +1123,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "deleteConnection";
// Input PK Fields
cm.Parameters.AddWithValue("@DBID", dbid);
@@ -1170,6 +1176,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "existsConnection";
cm.Parameters.AddWithValue("@DBID", _DBID);
int count = (int)cm.ExecuteScalar();