Jitendra Shekhawat

Jitendra Shekhawat

  • NA
  • 1.7k
  • 16.9k

Syntaxerror missing operator in query expression SN='. Invb6

Feb 3 2017 12:32 AM
  1.  con.Open Constr    
  2.   rs.Open "Select Name,Phoneno,Age from Test where  SN  =" & addEdit.Text, con 
  3.                For a = 1 To ListView1.ListItems.Count         
  4.  If ListView1.ListItems.Item(a).Checked = True Then            
  5. addEdit.Text = rs("SN")                            
  6. sql = "delete from Test where SN=" & addEdit.Text          
  7. addEdit.Text = "SN"           
  8. NameText.Text = ""           
  9. PhText.Text = ""            
  10. AgeText.Text = ""            
  11. NameText.SetFocus            
  12. con.Execute (sql)     
  13. End If       
  14. rs.MoveNext   
  15. Next    
  16. con.Close

Answers (3)