玛咖粉价格:ADO高手过来帮帮忙

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/30 13:45:58
Private Sub Command1_Click()
Dim inputno As String
Dim passwd As String
Dim ssql As String
ssql = "select passwd from stu_fee where lab_no=" & inputno
inputno = Text1.Text
passwd = Text2.Text
Set rs = cn.Execute(ssql)
开始连接数据库都一切OK,就是运行到最后一句说“=”号附近有语法错误。。

ssql = "select passwd from stu_fee where lab_no=" & inputno
这句呢

ssql = "select passwd from stu_fee where lab_no='" & inputno &"'"
因为你是字符串嘛