You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FormBase.VdwConfigurationSettings.VdwEventLog.Add(Event.CreateNewEvent(EventTypes.Error,$"There was an issue creating the schema {FormBase.VdwConfigurationSettings.VdwSchema} in database {conn.Database}."));
638
+
varerrorMessage=$"There was an issue creating the schema '{FormBase.VdwConfigurationSettings.VdwSchema}' in database '{conn.Database}'.";
FormBase.VdwConfigurationSettings.VdwEventLog.Add(Event.CreateNewEvent(EventTypes.Error,$"There was an issue executing the query {result} in database {conn.Database}."));
649
+
varerrorMessage=$"There was an issue executing the query '{result}' in database '{conn.Database}'.";
FormBase.VdwConfigurationSettings.VdwEventLog.Add(Event.CreateNewEvent(EventTypes.Error,$"There was an issue establishing a connection to generate the output for {targetTableName}. Is there a TEAM connections file in the configuration directory?"));
656
+
varerrorMessage=$"There was an issue establishing a connection to generate the output for '{targetTableName}'. Is there a TEAM connections file in the configuration directory?";
FormBase.VdwConfigurationSettings.VdwEventLog.Add(Event.CreateNewEvent(EventTypes.Error,$"The template could not be compiled. The error message is: {ex.Message}"));
664
+
varerrorMessage=$"The template could not be compiled. The error message is: {exception.Message}";
Copy file name to clipboardExpand all lines: Virtual_EDW/VdwUtility.cs
+9-4Lines changed: 9 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -201,7 +201,7 @@ public static void CreateVdwSchema(SqlConnection connection)
201
201
202
202
// Execute the check to see if the schema exists or not
203
203
varcheckCommand=newSqlCommand($"SELECT CASE WHEN EXISTS (SELECT * FROM sys.schemas WHERE name = '{FormBase.VdwConfigurationSettings.VdwSchema}') THEN 1 ELSE 0 END",connection);
204
-
varexists=(int)checkCommand.ExecuteScalar()==1;
204
+
varexists=(int)checkCommand.ExecuteScalar()==1;
205
205
206
206
if(exists==false)
207
207
{
@@ -218,7 +218,6 @@ public static void CreateVdwSchema(SqlConnection connection)
218
218
//createStatement.AppendLine("END");
219
219
220
220
createStatement.AppendLine("IF SCHEMA_ID('"+FormBase.VdwConfigurationSettings.VdwSchema+"') IS NULL EXEC('CREATE SCHEMA "+FormBase.VdwConfigurationSettings.VdwSchema+"')");
@@ -227,9 +226,15 @@ public static void CreateVdwSchema(SqlConnection connection)
227
226
FormBase.VdwConfigurationSettings.VdwEventLog.Add(Event.CreateNewEvent(EventTypes.Information,$"The VDW schema '{FormBase.VdwConfigurationSettings.VdwSchema}' was created for database '{connection.Database}'."));
228
227
}
229
228
}
230
-
catch(Exceptionex)
229
+
catch(Exceptionexception)
230
+
{
231
+
varerrorMessage=$"An issue occurred creating the VDW schema '{FormBase.VdwConfigurationSettings.VdwSchema}' in the '{connection.Database}' database. The reported error is {exception.Message}";
FormBase.VdwConfigurationSettings.VdwEventLog.Add(Event.CreateNewEvent(EventTypes.Error,$"An issue occurred creating the VDW schema '{FormBase.VdwConfigurationSettings.VdwSchema}'. The reported error is {ex}"));
0 commit comments