在table中﹐我寫了下面代碼﹐實現過濾某數值為空的數據。
table.close;
table.filter:='id='''+trim(edit1.text)+''' and dd not null'﹔
table.Filtered :=True﹔
table.open;
提示過濾錯誤﹐沒有正確結束。
各位給點方法﹐指導兄弟一下﹗
我不想用QUERY了﹐涉及要改的東西太多。

解决方案 »

  1.   

    table.close;
    table.filter:='id='''+trim(edit1.text)+''''+' and dd not null'﹔
    table.Filtered :=True﹔
    table.open;
    编译能通过,运行不了,是不是只能接受一个值?
      

  2.   

    //“dd not null”没这样的语法,试试“not dd is null”
    //try  Table1.Close;
      Table1.Filter := Format('id=%s and not dd is null', [QuotedStr(Edit1.Text)]);
      Table1.Filtered := True;
      Table1.Open;
      

  3.   

    table.filter:='id='''+trim(edit1.text)+''''+' and dd is not null';
      

  4.   

    table.filter:='id='''+trim(edit1.text)+''' and not dd is null';