*** 11,16 **** --- 11,29 ---- next try to access the database, the schema change is noticed, and SQLITE_SCHEMA is returned by sqlite3_reset() or sqlite3_finalize(). + _: *Note:* beginning with SQLite version 3.3.9, there is a new API + for preparing statements: + {link: /capi3ref.html#sqlite3_prepare_v2 sqlite3_prepare_v2()} + (and its companion function + {link: /capi3ref.html#sqlite3_prepare16_v2 sqlite3_prepare16_v2()}) + should be used in place of the older sqlite3_prepare() and + sqlite3_prepare16() functions. When the newer _v2 functions are + used, arrangements are made ot automatically detect SQLITE_SCHEMA + errors, reprepare the statement, and rerun the sqlite3_step(). + If you use the new _v2() functions instead of the legacy functions, + you really should not have to worry about anything on this wiki + page. + So you must always be prepared to deal with SQLITE_SCHEMA errors. sqlite3_expired() will tell you about known expirations but not about expirations that have not yet been discovered.