how to modify a datarow/how to get the index?

Do you want to change one record in particular of the currently available one?

to iterate the records -

foreach(DataRow dr in dt.Rows)
{
//change the data in the current record (DataRow)
}

To get a particular record you would need a query to get the record such as -

Select SomeRecordColumnData from mytable where SomeOtherRecordsColumnData = "SomeParticularData";

Then you should have a dataset with one datatable with one DataRow or record.
Change it by something like-

dr["SomeRecordColumnData"] = "Some new data";

Then you have to use the dataAdaptorss Update method to merge your data set with the original database.

hth,
Mick.
 
Back
Top