我使用ADODCD和DATAGRID绑定,RecordSource用SQL语句,发现用模糊查询没有结果。那位用过,是不是不支持?

解决方案 »

  1.   

    SQL为:select date1,ID,kahao1,name1,type1,qiliang1,yingfu1,InvoiceID from gouqi1 where date1>=#03/14/03# and date1<=#04/14/03# and name1 like '*张*'执行后 ADODC的Adodc1.Recordset.RecordCount=0
      

  2.   

    将*改成%
    SQL为:select date1,ID,kahao1,name1,type1,qiliang1,yingfu1,InvoiceID from gouqi1 where date1>=#03/14/03# and date1<=#04/14/03# and name1 like '%张%'
      

  3.   

    是没有查询到结果!
    如果不支持的话,recordcount返回-1或者直接报错了!
      

  4.   

    xing0091()说的对。DAO中的SQL语句是支持*的。