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

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?
 
S

Sahil Malik [MVP]

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/
 
J

Joe

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()
 
Joined
Jul 18, 2006
Messages
1
Reaction score
0
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top