Using LIKE statement for filtering

后端 未结 6 1727
南方客
南方客 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:26

    I recommend to use a SQL Query to perform this operation.

    Example:

    query1.SQL.Text:='Select * FROM table_name WHERE field like '+ QuotedStr(edit1.text+'%');
    query1.Active:=true;
    

提交回复
热议问题