Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reading & Saving Data
Message
From
27/08/2003 10:51:55
 
 
To
27/08/2003 04:22:51
General information
Forum:
ASP.NET
Category:
XML
Miscellaneous
Thread ID:
00822107
Message ID:
00823779
Views:
18
Victoria,

You need to use the DataSet.GetChanges() method. I typcially use two XML strings, one for changes and one for deleted rows (deleted rows need special processing). Something like this:
DataSet dsChanged = MyDataSet.GetChanges();
DataSet dsDeleted = MyDataSet.GetChanges(DataRowState.Deleted);

string ChangeXML = dsChanged.GetXML();
string DeleteXML = "";

if (dsDeleted != null)
{
    // The dsDeleted DataSet contains only the deleted rows.
    // However, the GetXML() method ignores deleted rows,
    // so you need to un-delete them first.
    dsDeleted.RejectChanges();
    DeleteXML = dsDeleted.GetXML();
}
~~Bonnie

>The WriteXml method wites the complete data to xml document.
>What about if I want to write only the changes?
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform