int sqlite3_close( sqlite3* db );
db
A database connection. A NULL may be safely passed to this function (resulting in a no-op).
An SQLite result code.
This function closes a database connection and releases all the resources associated with it. The application is responsible for finalizing all prepared statements and closing all BLOB handles. If the database connection is currently in a transaction, it will be rolled back before the database(s) are closed. All attached databases will automatically be detached.
If an application fails to finalize a prepared statement, the
close will fail and SQLITE_BUSY
will be returned. The statement
must be finalized and sqlite3_close()
must be called again.