DataSet.Delete does not change number of rows

  • Thread starter Thread starter dami.gupta
  • Start date Start date
D

dami.gupta

Hi,
I have a DataSet with 4 rows. I use .Delete command to delete a row
from it. I use .Count to get the number of remaining rows - still get
4, and if I try to access the rows, I get a
'DeletedRowInaccesibleException' on it. Has anyone seen this kind of
behaviour?
Thanks a lot in advance
DG
 
I have a DataSet with 4 rows. I use .Delete command to delete a row
from it. I use .Count to get the number of remaining rows - still get
4, and if I try to access the rows, I get a
'DeletedRowInaccesibleException' on it. Has anyone seen this kind of
behaviour?
Thanks a lot in advance

Read the docs for "DataRow.Delete()". Review "AcceptChanges()" and
"RowState" in particular.
 
Read the docs for "DataRow.Delete()". Review "AcceptChanges()" and
"RowState" in particular.

Thanks for your input. I had tried that, but I was getting worse
discrepancies with that. As in , in terms of dataset size...my table
was not getting saved accurately...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top