SQLite locate lazarus / 16-Databases ---------------------------------------------------------------------- koch · 2016-09-14 06:46 I have Lazarus 1.4.4 + ZeosLIB (ZeosDBO) 7.1.4 My project working with SQLite3 database and i need to store float numbers with precision 6 digits after comma. Sample script for creating table in database: 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 CREATE TABLE "test" (  id          INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,    f           DECIMAL(9,6)); Fill table with one record: 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 * from test;';with ZQuery1 dobegin  Open;  Insert;  FieldByName('f').AsFloat:=1.333333;  Post;end;  When I need to search record i do: 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.Locate('f', 1.333333, []) - return TRUE, it's OkZQuery1.Locate('f', 1.33335, []) - return FALSE, it's OkZQuery1.Locate('f', 1.333332, []) - return TRUE, it's MISTAKE!!!!!ZQuery1.Locate('f', 1.333334, []) - return TRUE, it's MISTAKE!!!!!  I have same behaviour when field 'f' have type REAL, DOUBLE or FLOAT. I have same behaviour with Lazarus 1.6 and(or) with ZeosLIB 7.2.1-rc Question: How i can locate float values with precision 6 in sqlite table? ---------------------------------------------------------------------- balazsszekely · 2016-09-14 06:57 Loop through the records, then use the CompareValue function from math unit: 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 begin  zQuery.DisableControls;  try    zQuery.First;    while not zQuery.EOF do    begin      CompareValue(....);      zQuery.Next;    end;  finally    zQuery.EnableControls;  end;end; ---------------------------------------------------------------------- koch · 2016-09-14 07:05 All records scan is not rational... I will have many thousand records in this table. May be exists another methods? ---------------------------------------------------------------------- ttomas · 2016-09-14 10:23 Quote from: koch on September 14, 2016, 09:05:57 amAll records scan is not rational... Locate do the same! Do you see Locate code?