Filter syntax lazarus / 63-Database ---------------------------------------------------------------------- johnmc · 2020-01-12 14:24 I have been trying to find some documenation regarding the syntax of the filter string used to filter a dataset, hitting F1 brings up only a brief description. Where can I find a complete description? The best that I can come up with is the wiki https://wiki.lazarus.free pascal.org/Lazarus_Tdbf_Tutorial#Index.2Ffilter_on_strings Was there some sort of software specification writen for this if so where would I find it? ---------------------------------------------------------------------- howardpc · 2020-01-12 14:30 Are you asking specifically about the Lazarus/FPC implementation of TDbf, or some other dataset descendant? ---------------------------------------------------------------------- johnmc · 2020-01-12 14:48 I am using Sqlite3, so that would be my preference if it makes any difference. ---------------------------------------------------------------------- balazsszekely · 2020-01-12 17:35 If you're using TSQLQuery, which is a TCustomBufDataset descendent,  the solution is quite simple: create an OnFilterRecord for the Query, then: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.SQLQuery1FilterRecord(DataSet: TDataSet; var Accept: Boolean);begin  Accept := SQLQuery1.FieldByName('FIRSTNAME').AsString = 'John';end; The code is self explanatory I guess, if not please let us know. ---------------------------------------------------------------------- johnmc · 2020-01-12 20:47 GetMem I was using TDataSet.Filter and want more info on the format and syntax of the filter string. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i       myFilter := 'Country = ' + QuotedStr(DBGrid1.SelectedField.AsString);      SQLQuery.filter := myFilter;      SQLQuery.Filtered := True;