Reputation: 477
Maybe I must use sometning like this:
var rows = ds.Tables["points"].Select("pupil_id == tempPupilId, discipline_id == intSelectedDisciplineId, point == Convert.ToInt32(currValue), point_date == dayToInsert");
foreach (var row in rows)
{
row.Delete();
}
But how check that this row is exists in Database?
Upvotes: 1
Views: 122
Reputation: 740
You can try this:
var rowsToDelete = (from row in ds.Tables["Points"].AsEnumerable()
where row.Field<type>("pupil_id") == tempPupilId //(i guess that you have it on code side, if not compare it in the same awy)
&& row.Field<type>("discipline_id") == intSelectedDisciplineId && etc..
select row).ToList();
foreach (var r in rowsToDelete)
r.Delete();
Upvotes: 1