diff --git a/vHC/HC_Reporting/Functions/Collection/DB/CDbWorker.cs b/vHC/HC_Reporting/Functions/Collection/DB/CDbWorker.cs index 3f47c62..f439f19 100644 --- a/vHC/HC_Reporting/Functions/Collection/DB/CDbWorker.cs +++ b/vHC/HC_Reporting/Functions/Collection/DB/CDbWorker.cs @@ -26,13 +26,18 @@ public CDbWorker() - public DataTable ExecQuery(string query) + public DataTable ExecQuery(string query, Dictionary parameters) { log.Info("executing sql query: " + query); try { using var connection = new SqlConnection(_cString); ; using SqlCommand command = new SqlCommand(query, connection); + foreach (var param in parameters) + { + command.Parameters.AddWithValue(param.Key, param.Value); + } + connection.Open(); DataTable t = new(); diff --git a/vHC/HC_Reporting/Functions/Collection/DB/CQueries.cs b/vHC/HC_Reporting/Functions/Collection/DB/CQueries.cs index 91bd696..2cc26ea 100644 --- a/vHC/HC_Reporting/Functions/Collection/DB/CQueries.cs +++ b/vHC/HC_Reporting/Functions/Collection/DB/CQueries.cs @@ -109,6 +109,7 @@ private void GetSqlServerVersion() { log.Info("getting sql server version"); string query = "Select @@version"; + //CDbWorker d = new(); DataTable dt = Fetch(query); @@ -175,7 +176,7 @@ private DataTable Fetch(string query) { log.Info("fetching sql data.."); //CDbWorker d = new(); - DataTable dt = dbWorker.ExecQuery(query); + DataTable dt = dbWorker.ExecQuery(query, new System.Collections.Generic.Dictionary()); log.Info("fetching sql data..ok!"); return dt; diff --git a/vHC/HC_Reporting/VeeamHealthCheck.csproj b/vHC/HC_Reporting/VeeamHealthCheck.csproj index 746a385..dc380da 100644 --- a/vHC/HC_Reporting/VeeamHealthCheck.csproj +++ b/vHC/HC_Reporting/VeeamHealthCheck.csproj @@ -11,10 +11,10 @@ Veeam AdamC Health_Check_Icon.ico - 2.0.0.567 + 2.0.0.568 False false - 2.0.0.567 + 2.0.0.568 full true diff --git a/vHC/VhcXTests/VhcXTests.csproj b/vHC/VhcXTests/VhcXTests.csproj index d75f0af..adfbd61 100644 --- a/vHC/VhcXTests/VhcXTests.csproj +++ b/vHC/VhcXTests/VhcXTests.csproj @@ -7,8 +7,8 @@ false true - 1.0.0.294 - 1.0.0.294 + 1.0.0.295 + 1.0.0.295