More SQLite LIKE issues lazarus / 16-Databases ---------------------------------------------------------------------- Arskin_Fertrubble · 2024-04-10 23:23 Using a SQLite client or shell, something like this works: SELECT aName FROM myTable WHERE aName LIKE "%George%"; If I do the same in a Freepascal/ Lazarus Tquery or Tzquery component the query will execute but no expected records are returned. If I parameterize the Tquery or Tzquery SQL as in SELECT aName FROM myTable WHERE aName LIKE :aParam; and assign zquery.parameterbyname('aParam').value := '%George%';, again the query seems to execute OK but returns no expected records.  Is this by design or am I missing something? Thanks. ---------------------------------------------------------------------- dseligo · 2024-04-10 23:37 You know you have to use double quotes? So this works: 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   ZQuery1.SQL.Text := 'select aName from myTable where aName like ''%George%'' ';  ZQuery1.Open; Parameterized query also works. Maybe the problem is because you used '.value'. Try it like this: 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   ZQuery1.SQL.Text := 'select aName from myTable where aName like :aParam';  ZQuery1.ParamByName('aParam').AsString := '%George%';  ZQuery1.Open;