public SqlAnywhereTable ReadCommand(OdbcCommand cmd)
        {
            var table = new SqlAnywhereTable();

            using (var reader = cmd.ExecuteReader())
            {
                for (int ordinal = 0; ordinal < reader.FieldCount; ordinal++)
                {
                    table.Columns.Add(reader.GetName(ordinal));
                }

                while (reader.Read())
                {
                    var row = new string[reader.FieldCount];
                    for (var i = 0; i < reader.FieldCount; i++)
                    {
                        row[i] = reader[i].ToString();
                    }
                    table.Rows.Add(row);
                }
            }

            return table;
        }
 private void ShowResults(SqlAnywhereTable table)
 {
     ResultsDataGrid.Columns.Clear();
     ResultsDataGrid.ItemsSource = null;
     ResultsDataGrid.Items.Refresh();
     for (int i = 0; i < table.Columns.Count; i++)
     {
         var col = new DataGridTextColumn
         {
             Header = table.Columns.ElementAt(i),
             Binding = new Binding("[" + i + "]")
         };
         ResultsDataGrid.Columns.Add(col);
     }
     ResultsDataGrid.ItemsSource = table.Rows;
     ResultsDataGrid.Items.Refresh();
 }