加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

sqlite3_finalize()

发布时间:2020-12-12 20:28:28 所属栏目:百科 来源:网络整理
导读:Destroy A Prepared Statement Object int sqlite3_finalize(sqlite3_stmt *pStmt); The sqlite3_finalize() function is called to delete aprepared statement. If the most recent evaluation of the statement encountered no errors or if the statemen

Destroy A Prepared Statement Object

int sqlite3_finalize(sqlite3_stmt *pStmt);

The sqlite3_finalize() function is called to delete aprepared statement. If the most recent evaluation of the statement encountered no errors or if the statement is never been evaluated,then sqlite3_finalize() returns SQLITE_OK. If the most recent evaluation of statement S failed,then sqlite3_finalize(S) returns the appropriateerror codeorextended error code.

The sqlite3_finalize(S) routine can be called at any point during the life cycle ofprepared statementS: before statement S is ever evaluated,after one or more calls tosqlite3_reset(),or after any call tosqlite3_step()regardless of whether or not the statement has completed execution.

Invoking sqlite3_finalize() on a NULL pointer is a harmless no-op.

The application must finalize everyprepared statementin order to avoid resource leaks. It is a grievous error for the application to try to use a prepared statement after it has been finalized. Any use of a prepared statement after it has been finalized can result in undefined and undesirable behavior such as segfaults and heap corruption.

See also lists ofObjects,Constants,andFunctions.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读