private void SplitInsertCommand() { string[] words2 = insertCommand.Split(';'); for (int i = 0; i < words2.Length - 1; i++) { CommandLauncher.LaunchSqlCommand(words2[i]); } }
private void SplitCreateCommand() { string[] words = createCommand.Split(';'); for (int i = 0; i < words.Length - 1; i++) { CommandLauncher.LaunchSqlCommand(words[i]); } }
private static void DropAllTablesInDb() { // usuwannie wszystkich table z bazy try { var tmpConn = new ConnectToSql(MainWindow.mainSettings.databasePath); foreach (var tableName in tmpConn.GetTableNames()) { CommandLauncher.LaunchSqlCommand("drop table " + tableName, tmpConn.connection); } } catch (Exception) { // puste, for testing } }
private void buttonLaunchSql_Click(object sender, RoutedEventArgs e) { textBoxReturn.Text = CommandLauncher.LaunchSqlCommand(textBoxCommand.Text); }