limelect 48 Posted November 2, 2021 I have done filtering in other databases with no problem. This time I am using FDTable, My tries ProjectsFDTable.Filtered:=false; ProjectsFDTable.Filter:='Category =' +QuotedStr('Tools'); OR ProjectsFDTable.Filter:='Category = Tools'; ProjectsFDTable.Filtered:=True; Category is the column Tools is the data The errors are mainly - Tools cannot be found as the Column <<<< how come? With the QUERY component I have no problem but for my reasons I want to do it with FDTable. Any idea PS. I tried with ProjectsFDTable.SQL nothing worked. Share this post Link to post
Lajos Juhász 293 Posted November 2, 2021 Which Delphi version. I've never used TFDTable but tested successfully in D11 the code: ProjectsFDTable.Filter:='Category =' +QuotedStr('Tools'); ProjectsFDTable.Filtered:=true; It's working. Share this post Link to post
limelect 48 Posted November 2, 2021 @Lajos Juhász D10.2.3 Read and see I did try it !!! My tries ProjectsFDTable.Filtered:=false; ProjectsFDTable.Filter:='Category =' +QuotedStr('Tools'); OR ProjectsFDTable.Filter:='Category = Tools'; ProjectsFDTable.Filtered:=True; Share this post Link to post
Lajos Juhász 293 Posted November 2, 2021 5 minutes ago, limelect said: D10.2.3 Read and see I did try it !!! I read that, unfortunately I have no access to your working environment I can only confirm what's working at my side. I do not have D10.2.3 to test, tried with XE5 it's also working without a problem there. Share this post Link to post
limelect 48 Posted November 2, 2021 (edited) Thank The project is on 10. P.S using your suggestion I get Error 104 mismatch exspresion Edited November 2, 2021 by limelect Share this post Link to post
Lajos Juhász 293 Posted November 2, 2021 10 minutes ago, limelect said: Error 104 mismatch exspresion If you've the source of FireDAC you can debug FireDAC.Stan.Expr there are 4 cases when this exception is raised. Share this post Link to post
limelect 48 Posted November 2, 2021 (edited) Sure I am legitimate. Nice idea OOOpes i do not have FireDAC.Comp.DataSet.pas Edited November 2, 2021 by limelect Share this post Link to post
limelect 48 Posted November 2, 2021 How come you have the source???? and I do not Share this post Link to post
Stano 143 Posted November 2, 2021 Professional Delphi does not have FireDAC resources !!! Share this post Link to post
limelect 48 Posted November 3, 2021 OK and thanks . Guies am i stack?. which mean redesign with SQL I guess. Share this post Link to post
limelect 48 Posted November 3, 2021 FINALY I got it ProjectsFDTable.Filter := 'Category LIKE ' +QuotedStr('Tools'); Thanks everybody Share this post Link to post
Guest Posted November 3, 2021 Just curious (do not use FireDac), if you have a Query component, why do you need to use a "table" component? Share this post Link to post
limelect 48 Posted November 3, 2021 (edited) Read my comments above. It answers your question. It is in my question With the QUERY component I have no problem but for my reasons I want to do it with FDTable. Edited November 3, 2021 by limelect Share this post Link to post