The problem is when i delete a records from the listview, it deleted but when i look unto database it doesn't deleted.
Please help me solve this problem:
Here's my recent code:
Module1.connect()
Dim sqlconn As New OleDb.OleDbConnection
Dim Button = MessageBox.Show _
("Are you sure you want to delete this Data?", _
"Message", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1)
If Not ListView1.SelectedItems.Count = 0 Then
If Button = Windows.Forms.DialogResult.Yes Then
Dim sqlcmd As New OleDb.OleDbCommand("DELETE FROM table1 WHERE Processor="", Memory="", VideoCard="", HardDrive="", AntiVirus="" ", sqlconn)
ListView1.Items.Remove(ListView1.SelectedItems.Item(0))
MsgBox("Record Removed Successfully~!", MsgBoxStyle.Critical)
Else
MsgBox("No Record Selected.", MsgBoxStyle.Critical)
End If
Else
MsgBox("No Record Selected.", MsgBoxStyle.Critical)
End If
sqlconn.Close()