diff --git a/Vrh.Log4Pro.MaintenanceConsole/Manager - SQLDataBaseManager.cs b/Vrh.Log4Pro.MaintenanceConsole/Manager - SQLDataBaseManager.cs index d13fccc..92d45d3 100644 --- a/Vrh.Log4Pro.MaintenanceConsole/Manager - SQLDataBaseManager.cs +++ b/Vrh.Log4Pro.MaintenanceConsole/Manager - SQLDataBaseManager.cs @@ -303,10 +303,9 @@ GO try { ColorConsole.WriteLine(prefix: $" Enter the parameters for {actiontext} LastUpdated trigger.", bracket: "", text: "", f: ConsoleColor.Yellow); - string formattext = (manageaction?"[-]":"")+ "[DBNAME,][SCHEMA.]TABLE[,COLUMN]"; + string formattext = (manageaction?"[-]":"")+ "[SCHEMA.]TABLE[,COLUMN]"; ColorConsole.WriteLine(prefix: $" Format:", bracket: "", text: formattext, f: ConsoleColor.Yellow); - ColorConsole.WriteLine(prefix: " ", text: "DBNAME", bracket: "", suffix: $": name of the database of the trigger; default is {sqld.DBName} (example:LearALM2)"); ColorConsole.WriteLine(prefix: " ", text: "TABLE", bracket: "", suffix: $": MANDATORY name of the table of the trigger (example:ProductionPeriods)"); ColorConsole.WriteLine(prefix: " ", text: "SCHEMA", bracket: "", suffix: $": name of the schema of the table and of the trigger; default dbo (example:ALM)"); ColorConsole.WriteLine(prefix: " ", text: "COLUMN", bracket: "", suffix: $": name of the column (will be created) of the trigger; default is LastUpdated (example:LastUpdated)"); @@ -322,21 +321,19 @@ GO createtriggerparameters = createtriggerparameters.Substring(0,1) == "-" ?createtriggerparameters.Substring(1): createtriggerparameters; var optionList = createtriggerparameters.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); - string db = ""; + string db = sqld.DBName; string tablewithschema = ""; string column = ""; if (optionList.Length == 1) { tablewithschema = optionList[0]; } else if (optionList.Length == 2) { tablewithschema = optionList[0]; column = optionList[1]; } - else if (optionList.Length == 3) { db = optionList[0]; tablewithschema = optionList[1]; column = optionList[2]; } - else /*if (optionList.Length > 3)*/ { ColorConsole.WriteLine("ERROR! No more parameters required beside DBNAME,TABLEWITHSCHEMA and COLUMN!", ConsoleColor.Red); goto getparameters; } + else /*if (optionList.Length > 2)*/ { ColorConsole.WriteLine("ERROR! No more parameters required beside SCHEMA, TABLE and COLUMN!", ConsoleColor.Red); goto getparameters; } - if (string.IsNullOrWhiteSpace(db)) db = sqld.DBName; if (string.IsNullOrWhiteSpace(column)) column = "LastUpdated"; if (string.IsNullOrWhiteSpace(db)) { ColorConsole.WriteLine("ERROR! DATABASE can not be empty!", ConsoleColor.Red); goto getparameters; } - if (string.IsNullOrWhiteSpace(tablewithschema)) { ColorConsole.WriteLine("ERROR! TABLEWITHSCHEMA can not be empty!", ConsoleColor.Red); goto getparameters; } + if (string.IsNullOrWhiteSpace(tablewithschema)) { ColorConsole.WriteLine("ERROR! [SCHEMA.]TABLE can not be empty!", ConsoleColor.Red); goto getparameters; } var tablewithschemasplitted = tablewithschema.Split('.'); - if (tablewithschemasplitted.Length != 1 && tablewithschemasplitted.Length != 2) { ColorConsole.WriteLine("ERROR! TABLEWITHSCHEMA incorrect!", ConsoleColor.Red); goto getparameters; } + if (tablewithschemasplitted.Length != 1 && tablewithschemasplitted.Length != 2) { ColorConsole.WriteLine("ERROR! [SCHEMA.]TABLE incorrect!", ConsoleColor.Red); goto getparameters; } if (string.IsNullOrWhiteSpace(column)) { ColorConsole.WriteLine("ERROR! COLUMN can not be empty!", ConsoleColor.Red); goto getparameters; } string schema = "dbo"; diff --git a/Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs b/Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs index e39fc90..98a957f 100644 --- a/Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs +++ b/Vrh.Log4Pro.MaintenanceConsole/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.25.1.0")] -[assembly: AssemblyFileVersion("1.25.1.0")] +[assembly: AssemblyVersion("1.25.2.0")] +[assembly: AssemblyFileVersion("1.25.2.0")] -- libgit2 0.21.2