Hello all, eventually had the need to sign up for the forum to ask questions so as a short introduction: i've been programming Object Pascal since Delphi1 and the last decade or so using FPC/Lazarus. I'm not the greatest programmer, it's also a hobby and at work it's part of what i do, we make electronic measurement equipment.
I've ran into an issue with TSQLQuery connected to a SQLite database. I use the typical
while not (Q.EOF) do begin ... ; Q.Next; end;
construction.
It appeared on my dataset this only works correcly if i add a LIMIT to the query, f.e.:
'SELECT stamp,%s FROM `%s` WHERE TRUE %s ORDER BY stamp ASC LIMIT 15000'
However, if i remove the limit, or make the number bigger - it's likely the same issue - the query
partly fails. It will return the first thousand or so records, then suddenly report EOF. If i limit to 15000 records, i get the complete data set.
I do a First and a Last already, as suggested in
https://forum.lazarus.freepascal.org/index.php/topic,48738.0.html , since i need the timestamps to scale stuff into a graph. So going by the docs and other topics the complete dataset should already be buffered. It obviously is not or better said: it lost data. After doing .last the last record actually contains valid data, but i cannot loop the whole data set for some reason.
What am i overlooking? Or did i bump into so bug, like memory limitations? Records are not insanely large, just numeric data. Any workaround?