hi so i have a basic form connected to a database to connect to a database, now my problem is that when i press delete it deletes from the datagridview but not from the actual database and yes i am checking the database in the debug folder also after I use the delete button when add a new row to the database and click save the program crashes and i get the error Concurrency violation: the DeleteCommand affected 0 of the expected 1 records
Save button code
01 | Private Sub btnSave_Click_1(sender As Object, e As EventArgs) Handles btnSave.Click |
05 | Me.InterimStorageOrdersBindingSource.EndEdit() |
06 | Me.Interim_Storage_OrdersTableAdapter.Update(Me.Stock_ManagerDataSet.Interim_Storage_Orders) |
07 | MsgBox("Update successful") |
10 | MsgBox("Update failed") |
Delete Button Code
1 | Private Sub btnDelete_Click(sender As Object, e As EventArgs) Handles btnDelete.Click |
2 | InterimStorageOrdersBindingSource.RemoveCurrent() |