I've moved to framework 2.0 and code that used to work now doesn't. I have a
typed dataset:
FlavourData d;
Now I want to filter the dataset so that I leave updated rows in one
particular table only (the "Flavour" table). To do this I first apply the
GetChanges method to the table that I'm interested in. GetChanges called in
this way returns an un-typed DataTable object:
DataTable upd = d.Flavour.GetChanges(DataRowState.Modified);
I need to translate this back into a typed dataset of type FlavourData, so I
create a new object of that type and merge the contents of my DataTable into
it:
FlavourData updates = new FlavourData();
if (upd != null) updates.Merge(upd,true,MissingSchemaAction.Ignore);
This worked fine in version 1 of the framework, but in framework 2 (beta 2),
even if my upd DataTable contains 2 rows after the GetChanges method has
been applied, the Merge results in an empty typed dataset.
Is this a bug ? What should I do to get round it ?
|