Adodc1.RecordSource = "SELECT * FROM info WHERE name LIKE '银行%' and name LIKE '% & Text1.Text & %'"dim ss as stringAdodc1.RecordSource = "SELECT * FROM info WHERE name LIKE '银行%' and name LIKE '% ss %'"这2句like 模糊查询错在何处?多谢

解决方案 »

  1.   

    'name是系统保留字,要用方括号括起来
    Adodc1.RecordSource="SELECT * FROM info WHERE [name] LIKE '银行%' and [name] LIKE '% ss %'"
      

  2.   

    Select * from info where name like '银行%' and '%ss%'
      

  3.   

    百分号是SQLSever的通配符,Ado里用?和*
      

  4.   

    Adodc1.RecordSource = "SELECT * FROM info WHERE name LIKE '银行%' and name LIKE '% & Text1.Text & %'"
    这个文本框错在何处
      

  5.   

    再说你这个语句也不对哇?
    Adodc1.RecordSource = "SELECT * FROM info WHERE name LIKE '银行' & *  and name LIKE * & Text1.Text & *"dim ss as stringAdodc1.RecordSource = "SELECT * FROM info WHERE name LIKE '银行' & *  and name LIKE * & 'ss' & * "