I did read the documentation and that says: If the most recent API call was successful, then the return value from sqlite3_errcode is undefined. It is a bit awkward though that after doing this after sqlite3_step gives 100 or 101 for sqlite3_errcode and unknown error for sqlite3_errmsg. Why can't it give 0 and not an error respectively? Or should this indeed be the case?
RBS