Hello. I started making my software and i using database. When I select record in database and click Delete Button i got error message: Update requires a valid DeleteCommand when passed DataRow collection with deleted rows. The code of my Delete Button is:
Private Sub DeleteMember_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DeleteMember.Click
If MsgBox("Da li ste sigurni da želite da izbrišete člana?", MsgBoxStyle.YesNo, Title:="Operacija brisanja člana") = vbYes Then
Me.Table1BindingSource.RemoveCurrent()
Me.Validate()
Me.Table1BindingSource.EndEdit()
Me.TableAdapterManager1.UpdateAll(Me.Database1DataSet)
GroupBox1.Enabled = False
GroupBox2.Enabled = False
Else
End If
End Sub
Only what I need is a valid DeleteCommand that delete records I deleted with Delete Button. Can anyone help me? And before helping me tell me is that possible. Thanks