VB2017 With MS Access Database - Deleting A Selected Row (Selected Using BindingSource) And Nav Buttons

  • Thread starter Thread starter Developer Dude
  • Start date Start date
D

Developer Dude

Guest
Hi:

Its been a while since I did database programming. I have a small app using a VB2017 Interface and an MS Access Database.

I can add, edit and view rows of data but I can't for the life of me remember how to code the delete feature. Here is what I have:


Private Sub btnDelete_Click(sender As Object, e As EventArgs) Handles btnDelete.Click
'Delete_SE
Dim Int As Integer = 0
dsPSB.Tables("dtSE").Rows(0).Delete()
DaSE.Update(dsPSB, "dtSE")
End Sub


Private Sub Delete_Command_SE()
'Create An OleDb Command To Delete Service Data.
SE_DeleteCommand.Connection = cnPSB
SE_DeleteCommand.CommandType = CommandType.Text

strSE_DeleteCommand = "DELETE * FROM SE WHERE SE_KEY = @SE_KEY"

SE_DeleteCommand.CommandText = strSE_DeleteCommand
End Sub

I sure would appreciate some help.

Thanks so much.

John

Continue reading...
 
Back
Top