J
julio
I am trying to use Update to save changes made on two DataGridView's to two
tables (Posts & PostDetails) with a FK relationship. I say
private void bUpdate_Click(object sender, EventArgs e) {
try {
CustomerDataSetTableAdapters.TableAdapterManager taManager = new
CustomerDataSetTableAdapters.TableAdapterManager();
taManager.PostsTableAdapter = postsTableAdapter;
taManager.PostDetailsTableAdapter = postDetailsTableAdapter;
postsBindingSource.EndEdit();
postsDetailsBindingSource.EndEdit();
taManager.UpdateAll(customerDataSet);
}
catch (System.Exception ex) {
MessageBox.Show(ex.Message.ToString());
}
}
It doesn't work. Note:
1. Changes (just DataGridView edits to existing records) don;t show in the
databse.
2. It doen't raise an exception.
3. CustomerDataSet (in UpdateAll() line) contains the new values.
Can you help?
Thanks
tables (Posts & PostDetails) with a FK relationship. I say
private void bUpdate_Click(object sender, EventArgs e) {
try {
CustomerDataSetTableAdapters.TableAdapterManager taManager = new
CustomerDataSetTableAdapters.TableAdapterManager();
taManager.PostsTableAdapter = postsTableAdapter;
taManager.PostDetailsTableAdapter = postDetailsTableAdapter;
postsBindingSource.EndEdit();
postsDetailsBindingSource.EndEdit();
taManager.UpdateAll(customerDataSet);
}
catch (System.Exception ex) {
MessageBox.Show(ex.Message.ToString());
}
}
It doesn't work. Note:
1. Changes (just DataGridView edits to existing records) don;t show in the
databse.
2. It doen't raise an exception.
3. CustomerDataSet (in UpdateAll() line) contains the new values.
Can you help?
Thanks