I suspect @gidden didn't do it. It looks like sqlite3_errmsg just sometimes returns "not an error" . Or, at least, the internet thinks so http://sqlite.1065341.n5.nabble.com/Error-code-21-SQLITE-MISUSE-when-binding-variables-td46525.html.