Added a Timeout property to the FolderConfig

Added Command Timeout to each query that did not have a specified timeout
This commit is contained in:
Rich committed 2017-03-01 15:40:36 +00:00
1 parent e77a17d645
commit aa40ff017d
8 files changed
+50 -7

No files matched your search

@@ -131,6 +131,7 @@ namespace VEPROMS.CSLA.Library
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandText = "getAnnotationTypeByName";
cm.CommandTimeout = Database.SQLTimeout;
cm.Parameters.AddWithValue("@Name", criteria.Name);
using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader()))
{
@@ -264,6 +265,7 @@ namespace VEPROMS.CSLA.Library
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "deleteAnnotationWithUserID";
cm.Parameters.AddWithValue("@AnnotationID", criteria.AnnotationID);
cm.Parameters.AddWithValue("@UserID", criteria.UserID);