Private Sub command2_click()
Adodc1.RecordSource = "select*form tushu where (用户名='高级管理员'and 密码 ='"&text2.text&"')"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount = 0 Then
MsgBox "用户或密码错误,请核对"
Else
Frame1.Visible = True
End If
End Sub就是一个 找了 两天都没找到错误  网上查到的解决办法也解决不了   求求各位帮帮我这个菜鸟
用其他方法该了有提示  From附近语法错误

解决方案 »

  1.   

    '注意空格
    Adodc1.RecordSource = " select * form tushu where (用户名='高级管理员'and 密码 ='"& text2.text &"')" 
      

  2.   

    Adodc1.RecordSource = " select * form tushu where (用户名='高级管理员' and 密码 ='"& text2.text &"')" 
      

  3.   

    Adodc1.RecordSource = " select * form tushu where 用户名='高级管理员' and 密码 ='"& text2.text &"'" 

    Adodc1.RecordSource = " select * form tushu where "用户名"='高级管理员' and 密码 ='"& text2.text &"'" 
    试试
      

  4.   

    晕啊  为什么错啊………………  我找到了个错  Form 错了  是 from     可是 我该了后  还是  缺少结束语句
      

  5.   

    缺少语句结束    select * from tushu where "用户名"='高级管理员' and 密码 ='"& text2.text &"'
    这个查询语句已经通过查询分析器的调试了  但是  不知道其他地方错在哪
       怎么没有人了啊
      

  6.   

    Adodc1.RecordSource  = "select * from tushu where 用户名='高级管理员' and 密码 ='" & text2.text & "'"
      

  7.   

    我 找到Form 错了  是 from     可是 我该了后  还是  缺少结束语句
      

  8.   

    of123   还在吗  帮帮看看  我找到Form 错了是 from     可是 我该了后还是缺少结束语句…………
      

  9.   

    Adodc1.RecordSource = "select * form tushu where (用户名='高级管理员'and 密码 ='" & text2.text & "')" 注意括号要用半角的,& 两边都要有空格。
      

  10.   

    你 代码 一行 一行 注释掉,看看 到底是哪句 错了 .不就可以了....先把 Adodc1.RecordSource = "select*form tushu where (用户名='高级管理员'and 密码 ='"&text2.text&"')"   注释了,看看是这句 有问题吗
      

  11.   

    第一,FROM拼错了.第二,可能在TEXT中输入了单撇之类的字符.第三,你用debug.print 那句拼好的SQL语句,然后到数据库里去调试一下.
      

  12.   

    别找了LZ,就错在第一句查询语句那里了,
    1.你的"&"和'没有搭配好!
    2.form 是窗体 from 是关键字