SQLite Forum

How to get the last row_id in a table without inserting anything
Login
sqlite3_exec() does *not* return the answer of your query.  sqlite3_exec() returns an integer code that indicates whether or not the query succeeded.  If you want the answer, you have to set a callback function and retrieve the answer in the callback function.