Exemplo n.º 1
0
 private void SplitInsertCommand()
 {
     string[] words2 = insertCommand.Split(';');
     for (int i = 0; i < words2.Length - 1; i++)
     {
         CommandLauncher.LaunchSqlCommand(words2[i]);
     }
 }
Exemplo n.º 2
0
        private void SplitCreateCommand()
        {
            string[] words = createCommand.Split(';');

            for (int i = 0; i < words.Length - 1; i++)
            {
                CommandLauncher.LaunchSqlCommand(words[i]);
            }
        }
Exemplo n.º 3
0
 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
     }
 }
Exemplo n.º 4
0
 private void buttonLaunchSql_Click(object sender, RoutedEventArgs e)
 {
     textBoxReturn.Text = CommandLauncher.LaunchSqlCommand(textBoxCommand.Text);
 }