con.Open Constr rs.Open "Select Name,Phoneno,Age from Test where SN =" & addEdit.Text, con For a = 1 To ListView1.ListItems.Count If ListView1.ListItems.Item(a).Checked = True Then addEdit.Text = rs("SN") sql = "delete from Test where SN=" & addEdit.Text addEdit.Text = "SN" NameText.Text = "" PhText.Text = "" AgeText.Text = "" NameText.SetFocus con.Execute (sql) End If rs.MoveNext Next con.Close
con.Open Constr
rs.Open "Select Name,Phoneno,Age from Test where SN =" & addEdit.Text, con
For a = 1 To ListView1.ListItems.Count
If ListView1.ListItems.Item(a).Checked = True Then
addEdit.Text = rs("SN")
sql = "delete from Test where SN=" & addEdit.Text
addEdit.Text = "SN"
NameText.Text = ""
PhText.Text = ""
AgeText.Text = ""
NameText.SetFocus
con.Execute (sql)
End If
rs.MoveNext
Next
con.Close