Hi,
I have a table that contains Data in an MS Access DB. Im trying to set my program to delete all data in a single table using the below code:
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim Rows As DataRow
For Each Rows In Label_LocationsDataSet.TransferLabels.Rows
Rows.Delete()
Next
Label_LocationsDataSet.TransferLabels.AcceptChanges()
End Sub
Why won't this save changes in the database? As soon as i click my "Refresh Data" button set to empty then refill the Dataset, everything re-appears again. By the way for those who haven't recognised my noviceness, yes i am a novice...
Once again, thanks in advance for any and all help
D
I have a table that contains Data in an MS Access DB. Im trying to set my program to delete all data in a single table using the below code:
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim Rows As DataRow
For Each Rows In Label_LocationsDataSet.TransferLabels.Rows
Rows.Delete()
Next
Label_LocationsDataSet.TransferLabels.AcceptChanges()
End Sub
Why won't this save changes in the database? As soon as i click my "Refresh Data" button set to empty then refill the Dataset, everything re-appears again. By the way for those who haven't recognised my noviceness, yes i am a novice...
Once again, thanks in advance for any and all help
D