Rajya
Member
Hi
I am unable to delete Row(s) from a DataTable - nothing actually happens - there are no errors & the lines get executed but when I check the actual Table, I find all the Rows intact! Following is the code I am using for delete -
cEssentials.cDataTable.Rows(intIndexToDelete).Delete()
cEssentials.cDataSet.AcceptChanges()
cEssentials.cSqlDataAdapter.Update(cEssentials.cDataSet, Security")
I am Filling the DataSet using the same DataAdapter in the Form Load event; later, the above delete code is getting fired from a proc.
I have also tried out .Remove and .RemoveAt but both behave the same.The DataTable, DataSet and SqlDataAdapter objects are not touched after the Form Load.
Where am I going wrong? Please help :-(
I am unable to delete Row(s) from a DataTable - nothing actually happens - there are no errors & the lines get executed but when I check the actual Table, I find all the Rows intact! Following is the code I am using for delete -
cEssentials.cDataTable.Rows(intIndexToDelete).Delete()
cEssentials.cDataSet.AcceptChanges()
cEssentials.cSqlDataAdapter.Update(cEssentials.cDataSet, Security")
I am Filling the DataSet using the same DataAdapter in the Form Load event; later, the above delete code is getting fired from a proc.
I have also tried out .Remove and .RemoveAt but both behave the same.The DataTable, DataSet and SqlDataAdapter objects are not touched after the Form Load.
Where am I going wrong? Please help :-(