There is a method
private void dataGuests_RowEditEnding(object sender, DataGridRowEditEndingEventArgs e) { MySqlConnection conn = new MySqlConnection(connStr); string SqlQuery = "select * from guests ORDER BY id DESC;"; MySqlDataAdapter adapter = new MySqlDataAdapter(SqlQuery, connStr); DataSet DS = new DataSet(); try { conn.Open(); adapter.Update(DS, "guests"); //adapter.Fill(DS, "LoadDataBinding"); } catch (MySqlException ex) { MessageBox.Show("Error: " + ex); } finally { conn.Close(); } } When you run the application swears at:
An unhandled exception of type "System.InvalidOperationException" in System.Data.dll.
Additional information: Update operations could not find TableMapping ["guests"] or DataTable "guests".
I read it , but the designer selects all the data from the same table and fills it in the Grid. And correctly. Checked in the table PRIMARY KEY - in stock.
I ask to send a lost wanderer
gueststable. - Alexander Petrov