# sqlite3_finalize

Definition: | include pSQLite.e integer res = sqlite3_finalize(sqlite3_stmt pStmt)
Description: | The sqlite3_finalize() routine deallocates a prepared SQL statement. All prepared statements must be finalized before the database can be closed. If the statement was executed successfully, or not executed at all, then SQLITE_OK is returned. If execution of the statement failed then an error code is returned. All prepared statements must finalized before sqlite3_close() is called or else the close will fail with a return code of SQLITE_BUSY. This routine can be called at any point during the execution of the virtual machine. If the virtual machine has not completed execution when this routine is called, that is like encountering an error or an interrupt. Incomplete updates may be rolled back and transactions cancelled, depending on the circumstances, and the result code returned will be SQLITE_ABORT.
pwa/p2js: | Not supported
Example: | See sqlite3_prepare