Woking with SQLite databases, I came across another misleading error yesterday. If you are getting the following error…
Failure 21 (out of memory) on 0x0 when preparing
…while going something in SQLite then this message probably doesn’t mean what it says. I spent a while trying to reduce memory usage until I realised my SQL had invalid syntax.
So if you get this error, first look to see if your SQL is correct!

