Exemple #1
0
 private void BtnSubmitQuery_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < TxtQuery.Lines.Length; ++i)
     {
         QueryResult queryResult = db.SubmitQuery(TxtQuery.Lines[i]);
         string[,] queryResults = queryResult.Results;
         if (queryResult.Error != "none")
         {
             //null means error
             MessageBox.Show("Input SQL contained a " + queryResult.Error + " error.");
         }
         else
         {
             Output(queryResults);
         }
     }
 }
Exemple #2
0
        private void SubmitQuery()
        {
            string[] trimmedLines = GetTrimmedLines();

            string[] queries = String.Join(" ", trimmedLines).Split(';').Where(x => !string.IsNullOrWhiteSpace(x))
                               .ToArray();
            for (int i = 0; i < queries.Length; ++i)
            {
                QueryResult queryResult  = db.SubmitQuery(queries[i]);
                IntSchTable queryResults = queryResult.Results;
                if (queryResult.Error.ErrorType != "none")
                {
                    ShowError(queryResult.Error);
                }
                else
                {
                    Output(queryResults);
                }
            }
        }