Small. Fast. Reliable.
Choose any three.

About Sitemap Documentation Download License News Developers Support

## SQLite C Interface

## Destroy A Prepared Statement Object

>     int sqlite3_finalize(sqlite3_stmt *pStmt);

The sqlite3_finalize() function is called to delete a prepared statement. 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 or extended error code is returned.

This routine can be called at any point during the execution of the prepared statement. If the virtual machine has not completed execution when this routine is called, that is like encountering an error or an interrupt. (See sqlite3_interrupt().) Incomplete updates may be rolled back and transactions cancelled, depending on the circumstances, and the error code returned will be SQLITE_ABORT.

### Invariants:

F11302 | The sqlite3_finalize(S) interface destroys the prepared statement S and releases all memory and file resources held by that object.
F11304 | If the most recent call to sqlite3_step(S) for the prepared statement S returned an error, then sqlite3_finalize(S) returns that same error.

See also lists of Objects, Constants, and Functions.

This page last modified 2008/05/12 13:08:44 UTC