本文介绍了查询表达式SN ='中的语法错误缺少运算符。在vb6中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Private Sub Delete_Click()
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
End Sub
我尝试了什么:
尝试: - Id = SN显示在edittext框中
What I have tried:
try to :- Id=SN is show in edittext box
推荐答案
rs.Open "Select Name,Phoneno,Age from Test where SN " & addEdit.Text, con, adOpenStatic, adLockReadOnly
应该是
it should be
rs.Open "Select Name,Phoneno,Age from Test where SN = " & addEdit.Text, con, adOpenStatic, adLockReadOnly
这篇关于查询表达式SN ='中的语法错误缺少运算符。在vb6中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!