From: http://www.cnblogs.com/AlexLiu/archive/2010/04/21/1716729.html
[IPhone-Sqlite3] sqlite3_prepare_v2 () does not return sqlite_ OK, debug
# Define sqlite_ OK0/* Successful result */
/* Beginning-of-error-codes */
# Define sqlite_error1/* SQL error or missing database */
# Define sqlite_internal2/* Internal logic error in SQLite */
# Define sqlite_perm3/* Access permission denied */
# Define sqlite_abort4/* Callback routine requested an abort */
# Define sqlite_busy5/* The database file is locked */
# Define sqlite_locked6/* A table in the database is locked */
# Define sqlite_nomem7/* A malloc () failed */
# Define sqlite_readonly8/* Attempt to write a readonly database */
# Define sqlite_interrupt9/* Operation terminated by sqlite3_interrupt ()*/
# Define sqlite_ioerr10/* Some kind of disk I/O error occurred */
# Define sqlite_corrupt11/* The database disk image is malformed */
# Define sqlite_notfound12/* Not used. Table or record not found */
# Define sqlite_full13/* Insertion failed because database is full */
# Define sqlite_cantopen14/* Unable to open the database file */
# Define sqlite_protocol15/* Not used. database lock protocol error */
# Define sqlite_empty16/* Database is empty */
# Define sqlite_schema17/* The database schema changed */
# Define sqlite_toobig18/* String or blob exceeds size limit */
# Define sqlite_constraint19/* Abort due to Constraint Violation */
# Define sqlite_mismatch20/* Data Type Mismatch */
# Define sqlite_misuse21/* Library used incorrectly */
# Define sqlite_nolfs22/* Uses OS features not supported on Host */
# Define sqlite_auth23/* Authorization denied */
# Define sqlite_format24/* Auxiliary database format Error */
# Define sqlite_range25/* 2nd parameter to sqlite3_bind out of range */
# Define sqlite_notadb26/* File opened that is not a database file */
# Define sqlite_row100/* Sqlite3_step () has another row ready */
# Define sqlite_done101/* Sqlite3_step () has finished executing */