|
int sqlite3_close(sqlite3 *);
Call this function with a pointer to a structure that was previously returned from sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2() and the corresponding database will by closed.
All SQL statements prepared using sqlite3_prepare_v2() or sqlite3_prepare16_v2() must be destroyed using sqlite3_finalize() before this routine is called. Otherwise, SQLITE_BUSY is returned and the database connection remains open.
Passing this routine a database connection that has already been closed results in undefined behavior. If other interfaces that reference the same database connection are pending (either in the same thread or in different threads) when this routine is called, then the behavior is undefined and is almost certainly undesirable.
See also lists of Objects, Constants, and Functions.