@schuler
Let A.I code windows compatibility too...
(passqlite3os)
BTW: this should not be necessary since FPC has opaque functions for that in system? I mean fpopen and consorts..., really? (system.assign, system.rewrite, system.reset, system.close, system.flush) fpopen and family are one level too deep and is taken care of in system? Maybe the model did not see that

It should also see the filemode properly, so filemode :=2 means it also works open read/write, no reset for reading.
(Or have I just defeated this particular A.I. system?)
It is probably just a definition issue, rules feeding.
Sqlite3 should compile cleanly without platform specifics, that is how it is designed. It would be nice if the Pascal version adheres to that.
At first sight I can't flaw the rest of the code. (early days)
Regards, Joao,
Thaddy