J
John Zink
If I call the delete method on a datatable that is
returned from a web service the delete appears to work,
but the row is still in the rows collection. I do not
receive any errors, but if after the delete I loop thru
the rows collection with a for each loop I get an error
when I hit the row. After I call AcceptChanges the row is
gone and I can get around the for each problem by checking
the rowstate, but I thought that after calling delete it
wouldn't be accessible. Also after the delete the
rowCount is not decremented.
Here is the code snippet:
Dim oServices As New UWEngineServices.UWEngineServices()
oDS = oServices.GetRulesetInfo("d067268", txtRSId.Text)
'shows 1
MessageBox.Show(oDS.UW_RULESETS.Count)
'shows false
MessageBox.Show(oDS.HasErrors)
oDS.UW_RULESETS(0).Delete()
'shows 1
MessageBox.Show(oDS.UW_RULESETS.Count)
'shows false
MessageBox.Show(oDS.HasErrors)
returned from a web service the delete appears to work,
but the row is still in the rows collection. I do not
receive any errors, but if after the delete I loop thru
the rows collection with a for each loop I get an error
when I hit the row. After I call AcceptChanges the row is
gone and I can get around the for each problem by checking
the rowstate, but I thought that after calling delete it
wouldn't be accessible. Also after the delete the
rowCount is not decremented.
Here is the code snippet:
Dim oServices As New UWEngineServices.UWEngineServices()
oDS = oServices.GetRulesetInfo("d067268", txtRSId.Text)
'shows 1
MessageBox.Show(oDS.UW_RULESETS.Count)
'shows false
MessageBox.Show(oDS.HasErrors)
oDS.UW_RULESETS(0).Delete()
'shows 1
MessageBox.Show(oDS.UW_RULESETS.Count)
'shows false
MessageBox.Show(oDS.HasErrors)