D
dm_dal
I'm sure i've just overlooked something obvious, or, could this be the way
it was designed?
I've got a Strongly-Typed DataSet with three tables, two of the tables are
children of the same parent (relationships are defined). Let's call them
TableParent, TableChild1, and TableChild2.
Now, when I change a value in one of the child tables, I'm commiting the
changes to the db by calling the Update method of the specific DataTable's
DataAdapter. example:
da_ParentTable.Update(MyDataSet);
da_TableChild1.Update(MyDataSet);
da_TableChild2.Update(MyDataSet);
I would think that if no data has changed in TableChild2, then nothing would
be saved to that table, but apparently I'm wrong. What I'm seeing is that
if any of the tables change, then it's matching parent and sibling tables
are being marked as updated and the DataAdapter is trying to save those rows
as well. This causes problems in my case. How do I make sure that only the
rows that were actually modified, get updated in the DB?
dmy
it was designed?
I've got a Strongly-Typed DataSet with three tables, two of the tables are
children of the same parent (relationships are defined). Let's call them
TableParent, TableChild1, and TableChild2.
Now, when I change a value in one of the child tables, I'm commiting the
changes to the db by calling the Update method of the specific DataTable's
DataAdapter. example:
da_ParentTable.Update(MyDataSet);
da_TableChild1.Update(MyDataSet);
da_TableChild2.Update(MyDataSet);
I would think that if no data has changed in TableChild2, then nothing would
be saved to that table, but apparently I'm wrong. What I'm seeing is that
if any of the tables change, then it's matching parent and sibling tables
are being marked as updated and the DataAdapter is trying to save those rows
as well. This causes problems in my case. How do I make sure that only the
rows that were actually modified, get updated in the DB?
dmy