M
Mark Chambers
Hi there,
Can anyone explain the following (very) simple scenario.
1) I make an exact copy of my "DataSet" and delete one record from a given
table (in the copy)
2) I invoke "DataSet.GetChanges()" on the above copy and pass the results to
"DataSet.Merge()" on the original copy
3) If I now inspect the original copy, it shows that the record has *not*
been deleted from the table. However, a call to "GetChanges()" does show my
deleted record.
Why doesn't the record get deleted from the original table after the merge
in step 2? Note that I've inspected my original "DataSet" after step 2 as
well as the "DataSet" returned by "DataSet.GetChanges()". Apparently
"DataSet.GetChanges()" returns a "DataSet" that's completely empty of data
except for the one affected table which contains the single deleted record.
That record is then simply added to the table in the original "DataSet" when
"DataSet.Merge()" is called. The original table therefore winds up with two
copies of the record, the origiinal and the deleted. Does anyone know what's
going on here. Thanks in advance.
Can anyone explain the following (very) simple scenario.
1) I make an exact copy of my "DataSet" and delete one record from a given
table (in the copy)
2) I invoke "DataSet.GetChanges()" on the above copy and pass the results to
"DataSet.Merge()" on the original copy
3) If I now inspect the original copy, it shows that the record has *not*
been deleted from the table. However, a call to "GetChanges()" does show my
deleted record.
Why doesn't the record get deleted from the original table after the merge
in step 2? Note that I've inspected my original "DataSet" after step 2 as
well as the "DataSet" returned by "DataSet.GetChanges()". Apparently
"DataSet.GetChanges()" returns a "DataSet" that's completely empty of data
except for the one affected table which contains the single deleted record.
That record is then simply added to the table in the original "DataSet" when
"DataSet.Merge()" is called. The original table therefore winds up with two
copies of the record, the origiinal and the deleted. Does anyone know what's
going on here. Thanks in advance.