N
Nathan
I want to delete a row from a dataset, and I use:
Dim SelectedRow() as DataRow = DataSet1.Table1.Select("Selection Criteria")
DataSet1.Table1.Rows.Remove(SelectedRow(0))
The SelectedRow returns 1 row = SelectedRow(0). This successfully removes
the row from the dataset, but upon calling the update command
(DataAdapter1.Update(DataSet1, "Table1") the database is not updated. When I
refresh the dataset, the removed row is still there. The update command
works successfully with inserted rows and other changes made to the dataset.
I have also tried using the SelectedRow().Delete and AcceptChanges, and I
get the exact same results. What's going wrong?
Dim SelectedRow() as DataRow = DataSet1.Table1.Select("Selection Criteria")
DataSet1.Table1.Rows.Remove(SelectedRow(0))
The SelectedRow returns 1 row = SelectedRow(0). This successfully removes
the row from the dataset, but upon calling the update command
(DataAdapter1.Update(DataSet1, "Table1") the database is not updated. When I
refresh the dataset, the removed row is still there. The update command
works successfully with inserted rows and other changes made to the dataset.
I have also tried using the SelectedRow().Delete and AcceptChanges, and I
get the exact same results. What's going wrong?