More input from the OP ! I might be narrowing down why TDISQLite3Database seems to be producing incorrect results. The object inspector for the TDISQLite3Database component I have shows the value of SQLiteVersion to be 3.7.6 The version information for version 3.1.3 of DISQLite3, released 23 Mar 2012 says that "Queries of the form: "SELECT max(x), y FROM table" returns the value of y on the same row that contains the maximum x value." so as my version is later it ought to behave this way. - But it doesn't. I tried a simple test by executing... CREATE TABLE Test( TheID TEXT, TheNum INT, TheValue INT ); INSERT INTO Test ( TheID, TheNum, TheValue) VALUES ('A', 1, 10), ('A', 5, 50), ('A', 3, 30), ('B', 8, 80), ('B', 6, 60), ('B', 2, 20); SELECT TheID, Min(TheNum), TheValue from test group by TheID; but the answer I got was TheID | Min(TheNum)| TheValue ------|------------|--------- A | 1 | 30 B | 2 | 20 instead of the correct answer (obtained im my SQLiteExpert db manager) of TheID | Min(TheNum)| TheValue ------|------------|--------- A | 1 | 10 B | 2 | 20 Ralf, does that help to provide a solution to my inserts giving incorrect results? From: docshotmail2@xxxxxxxxxxx To: yunqa@xxxxxxxxxxxxx Subject: [yunqa.de] Re: DISQLite3Database.execute() produces incorrect results (so does SQLiteSpy, but not other db managers)? Date: Thu, 26 Sep 2013 12:42:48 +0000 As an addition I notice that even just the select part of the sql produces incorrect results (zeros in two columns) when using SQLiteSpy compared with another db manager so maybe the apparent error is in the way the DISQLite3Database.execute() runs the select rather than the way it does the insert.