Added Command Timeout to each query that did not have a specified timeout
This commit is contained in:
@@ -659,6 +659,7 @@ namespace VEPROMS.CSLA.Library
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
cm.CommandType = CommandType.StoredProcedure;
|
||||
cm.CommandTimeout = Database.SQLTimeout;
|
||||
cm.CommandText = "addGrid";
|
||||
// Input All Fields - Except Calculated Columns
|
||||
cm.Parameters.AddWithValue("@ContentID", ContentID);
|
||||
@@ -695,6 +696,7 @@ namespace VEPROMS.CSLA.Library
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
cm.CommandType = CommandType.StoredProcedure;
|
||||
cm.CommandTimeout = Database.SQLTimeout;
|
||||
cm.CommandText = "addGrid";
|
||||
// Input All Fields - Except Calculated Columns
|
||||
cm.Parameters.AddWithValue("@ContentID", myContent.ContentID);
|
||||
@@ -754,6 +756,7 @@ namespace VEPROMS.CSLA.Library
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
cm.CommandType = CommandType.StoredProcedure;
|
||||
cm.CommandTimeout = Database.SQLTimeout;
|
||||
cm.CommandText = "updateGrid";
|
||||
// All Fields including Calculated Fields
|
||||
cm.Parameters.AddWithValue("@ContentID", ContentID);
|
||||
@@ -804,6 +807,7 @@ namespace VEPROMS.CSLA.Library
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
cm.CommandType = CommandType.StoredProcedure;
|
||||
cm.CommandTimeout = Database.SQLTimeout;
|
||||
cm.CommandText = "updateGrid";
|
||||
// Input All Fields - Except Calculated Columns
|
||||
cm.Parameters.AddWithValue("@ContentID", contentID);
|
||||
@@ -844,6 +848,7 @@ namespace VEPROMS.CSLA.Library
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
cm.CommandType = CommandType.StoredProcedure;
|
||||
cm.CommandTimeout = Database.SQLTimeout;
|
||||
cm.CommandText = "deleteGrid";
|
||||
cm.Parameters.AddWithValue("@ContentID", criteria.ContentID);
|
||||
cm.ExecuteNonQuery();
|
||||
@@ -866,6 +871,7 @@ namespace VEPROMS.CSLA.Library
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
cm.CommandType = CommandType.StoredProcedure;
|
||||
cm.CommandTimeout = Database.SQLTimeout;
|
||||
cm.CommandText = "deleteGrid";
|
||||
// Input PK Fields
|
||||
cm.Parameters.AddWithValue("@ContentID", contentID);
|
||||
@@ -918,6 +924,7 @@ namespace VEPROMS.CSLA.Library
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
cm.CommandType = CommandType.StoredProcedure;
|
||||
cm.CommandTimeout = Database.SQLTimeout;
|
||||
cm.CommandText = "existsGrid";
|
||||
cm.Parameters.AddWithValue("@ContentID", _ContentID);
|
||||
int count = (int)cm.ExecuteScalar();
|
||||
|
Reference in New Issue
Block a user