DataSet.GetChanges() returns tables that weren't changed

  • Thread starter Thread starter Joe
  • Start date Start date
J

Joe

If I inspect the tables property of the DataSet returned from GetChanges() I
notice that it has all the table in it that were in the original DataSet
even though records didn't change in those tables.
Is there a way to tell it to return only the tables that did change?
 
GetChanges will return you all rows and tables to satisfy the various
constraints that might exist within your dataset. That is the unchangeable
behavior of GetChanges. So it might include a few non-changed rows from
tables that might make you scratch your head and wonder "Why is that table
in the resultset?".

Try removing all constraints/relations and do it again.

- Sahil Malik [MVP]
http://codebetter.com/blogs/sahil.malik/
 
Thanks. That makes sense.

Sahil Malik said:
GetChanges will return you all rows and tables to satisfy the various
constraints that might exist within your dataset. That is the unchangeable
behavior of GetChanges. So it might include a few non-changed rows from
tables that might make you scratch your head and wonder "Why is that table
in the resultset?".

Try removing all constraints/relations and do it again.

- Sahil Malik [MVP]
http://codebetter.com/blogs/sahil.malik/





GetChanges()
 
I have the same problem and after exosting 4hours traycing through the code, I finally resolved by simple runing the Run Custom Tool of the dataset. I thought that this tool is running after any change of the tables in the dataset however it's seams it's not fully regenerate the code.
 
Back
Top