Hi all,
I was having a huge problem,i mean i spent days trying to fix it but i get the same exception everytime when i run the app.
here's the thing i have a record that is loaded from the database using the listview.it works perfect for the insertion part.but when i try to delete a certain row it gives me the previous exception.
so please if one of you could give me a precious solution
thankyou all
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
Dim str As String
Dim conn As OleDbConnection = GetDbConnection()
Dim cmd As OleDbCommand
Dim selectedItem As Integer = ListView1.SelectedIndices(0)
str = "DELETE FROM AdigratT WHERE Bridge_Number = '" & ListView1.Items(selectedItem).SubItems(0).Text & "'"
cmd = New OleDbCommand(str, conn)
cmd.ExecuteNonQuery()
MsgBox("Record Removed Successfully")
conn.Close()
End Sub