D
DBC User
I would like to delete a row from a dataset based on a condition. Here
is what I am doing
foreach(row in table1)
{
string key = row[columnname];
foreach(row1 in table2)
{
if (row1[columnname].tostring().equals(key))
row1.delete();
}
}
[I made it simple and please ignore the syntax, I have to code
correct]. right adter I do row1.delete on the next foreach loop of
table2, the program throws an exception saying the collection is
changed. How can I delete a row in table2 based on values from table1?
Thanks in advance.
is what I am doing
foreach(row in table1)
{
string key = row[columnname];
foreach(row1 in table2)
{
if (row1[columnname].tostring().equals(key))
row1.delete();
}
}
[I made it simple and please ignore the syntax, I have to code
correct]. right adter I do row1.delete on the next foreach loop of
table2, the program throws an exception saying the collection is
changed. How can I delete a row in table2 based on values from table1?
Thanks in advance.