Hi Matt,
"Matt" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have seen this question posted before but never answered.
>
> If I load a DataSet from a database query, I need to call
> AcceptChanges after DataRow.Delete to remove rows.
No, you shouldn't call AcceptChanges.
You will reset the rowstate and Update won't work because it won't see which
row was deleted.
AcceptChanges resets row state to unmodified.
>
> If I load a DataSet from an XML file or create one from scratch
> programatically- DataRow.Delete removes rows immediately, seemingly
> bypassing the rowstate and implicitly calling AccpetChanges. This
> happens on single table datasets, so it is not a constraint related
> issue.
>
Delete row either marks row as Deleted (a) or removes (b) the row .
a) when RowState is not Added
b) when RowState = Added
--
Miha Markic [MVP C#] - RightHand .NET consulting & development
www.rthand.com
SLODUG - Slovene Developer Users Group
www.codezone-si.info
> This behavior doesn't appear to be documented. Any explanations?
>
> Thanks
> (originally posted by Scott Allen)
>