Why is that? The state of the datarow is added. When I delete the row the state is unchanged. Why not deleted? Thats the reason my Delete Store Procedure is never called!
edit: the datarow is freshly added and then I try to delete it.
Why is that? The state of the datarow is added. When I delete the row the state is unchanged. Why not deleted? Thats the reason my Delete Store Procedure is never called!
edit: the datarow is freshly added and then I try to delete it.
show your code please. my test shows that everything works fine:
DataTable dt = new DataTable();
DataRow dr = dt.NewRow();
dt.Rows.Add(dr);
Console.WriteLine(dr.RowState);
dr.Delete();
Console.WriteLine(dr.RowState);
output is:
Added
Detached