Using LIKE statement for filtering

后端 未结 6 1721
南方客
南方客 2021-01-05 06:44

Im using this code to filter my table:

Table.Filtered := False;
Table.Filter := \'[\' + Field_Search + \'] LIKE \'\'%\' + Edit_Search.Text + \'%\'\'\';
Tabl         


        
6条回答
  •  清酒与你
    2021-01-05 07:32

    The following Code will work as Like as well:

    if Edit1.Text <>'' then
    begin
    Query1.Filter :='FieldName ='+quotedstr('*'+ edit1.Text +'*');
    Query1.Filtered:=true;
    end
    else
    begin query1.Filtered :=false; end;
    

提交回复
热议问题