Hello Ciaran,
> Ok I think the problem might be that the DataSet holds on to the
rows you
> delete but marks them as deleted in the dataset with the row.RowState
> property. This enables it to know which records to delete if you used a
> DataAdapter to update the database.
> --
so I can check the state.
If the state row.RowState == Deleted I can go one row further.
Correct?
Or maybe with Commit o Rollback .... ?
Regards Andrea
private void DemonstrateRowState()
{
// Run a function to create a DataTable with one column.
DataTable table = MakeTable();
DataRow row;
// Create a new DataRow.
row = table.NewRow();
// Detached row.
Console.WriteLine("New Row " + row.RowState);
table.Rows.Add(row);
// New row.
Console.WriteLine("AddRow " + row.RowState);
table.AcceptChanges();
// Unchanged row.
Console.WriteLine("AcceptChanges " + row.RowState);
row["FirstName"] = "Scott";
// Modified row.
Console.WriteLine("Modified " + row.RowState);
row.Delete();
// Deleted row.
Console.WriteLine("Deleted " + row.RowState);
}
http://msdn.microsoft.com/en-us/libr....rowstate.aspx