Good time gentlemen. I use wpf DataGrid to display a table from a MySQL database. The problem is that all the columns in the program are output normally and only one is empty, although there are values ​​in this column in the database itself (the same query in the workBench returns the complete table).
code proper:

public static DataTable ShowAllClient() { DataTable clients = new DataTable(); MySqlDataAdapter adapter = new MySqlDataAdapter(); using (MySqlConnection conn = new MySqlConnection(ConnectionString)) { string query = "SELECT * FROM orderholders"; try { MySqlCommand comm = new MySqlCommand(query, conn); adapter.SelectCommand = comm; conn.Open(); adapter.Fill(clients); } catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source, MessageBoxButton.OK, MessageBoxImage.Error); } return clients; } } 

what's my mistake?

  • Describe may be that for a non-refundable column, what type, and so on. - MihailPw
  • the type is exactly the same as the rest of the columns that are returned. VARCHAR (45) NULL. - Sergey

1 answer 1

The problem was that the column name contained "\"