DM.DataModule1.ADOQuery1.filter := 'BL_ID LIKE' + '''' + trim(edit1.text) + '''%' + ' and XM like ' + '''%' + trim(edit2.text) + '%''' + ' and SHBXH like' + '''%' + trim(edit3.text) + '%''';
     DM.DataModule1.ADOQuery1.filtered := true;
提示数据类型不对或者不再可接受范围之内。

解决方案 »

  1.   

    DM.DataModule1.ADOQuery1.filter := 'BL_ID LIKE' + '''' + trim(edit1.text) + '%''' + ' and XM like ' + '''%' + trim(edit2.text) + '%''' + ' and SHBXH like' + '''%' + trim(edit3.text) + '%''';
      

  2.   

    呵呵,遇到了一样的问题,后经我测试那个Filter只支持后半部分匹配,例如:A%,如果%A%则会提示上述错误。如果一定要左右匹配,那就得用OnFilter事件或者直接用SQL语句