I have one application, in that i am using a datarow object like this.
DataRow[] drRow;
drRow = _dsmenu.Tables["tblmenu"].Select("id='" + DocID + "'");
After this i make some changes in columns like this
drRow[0]["Allow"] = "Yes";
after all the changes, i need to save that particular datarow as a xml to the db. I can do the dataset to 开发者_如何学Pythonthe xml by getdataset() method. But i need to save only that particular datarow. Is it Possible? If yes please help me. thanks in advance..
I'm afraid this is not possible. I recommend you to do it this way.
DataRow[] rows = _dsmenu.Tables["tblmenu"].Select("id='" + DocID + "'");
rows[0]["Allow"] = "Yes";
DataTable table = new DataTable();
foreach (DataRow row in rows)
{
table.ImportRow(row);
}
table.WriteXml(""); // Take this into database.
精彩评论