是vb连接sql server,想要通过adodc在MSHFlexGrid里面显示,但是运行报错提示sql找不到存储过程以及对象Refresh的方法IAdodc失败T_T,小白不知道该怎么做--求大佬帮帮忙
Private Sub searchCmd_Click()
    Ado.RecordSource = "select * from product where'" & condition.Text & " '" = " '" & KeywordText.Text & "'"
    Ado.Refresh
End Sub

解决方案 »

  1.   

    调试的时候把鼠标移到Ado.RecordSource 上面它会显示Ado.RecordSource=”false“,是查询语句有误吗?
      

  2.   

     Ado.RecordSet = "select * from product where " & condition.Text & " " = " '" & KeywordText.Text & "'"
      

  3.   


    Private Sub searchCmd_Click()
        Ado.Recordset = "select * from product where" & condition.Text & " " = " '" & keywordText.Text & "'"
        Ado.Refresh
    End Sub运行跳出窗口报错:编译错误:属性的无效使用
      

  4.   

    注释掉所有On Error Resume Next语句,在VB6 IDE中运行,
    出错后点击调试,光标会停在出错的那条语句处,
    或者
    事先在怀疑可能有逻辑错误的语句处设置断点,运行经过断点时中断,此时可以在立即窗口中使用
    ?变量名

    ?函数名(函数参数)

    过程名(参数)
    辅助调试。
      

  5.   

     Ado.RecordSet ="select * from product where " & condition.Text & "  = '" & KeywordText.Text & "'"