微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

sqlite3_close()

Closing A Database Connection

int sqlite3_close(sqlite3 *);

The sqlite3_close() routine is the destructor for thesqlite3object. Calls to sqlite3_close() return sqlITE_OK if thesqlite3object is successfully destroyed and all associated resources are deallocated.

Applications mustfinalizeallprepared statementsandcloseallBLOB handlesassociated with thesqlite3object prior to attempting to close the object. If sqlite3_close() is called on adatabase connectionthat still has outstandingprepared statementsorBLOB handles,then it returns sqlITE_BUSY.

Ifsqlite3_close()is invoked while a transaction is open,the transaction is automatically rolled back.

The C parameter tosqlite3_close(C)must be either a NULL pointer or ansqlite3object pointer obtained fromsqlite3_open(),sqlite3_open16(),orsqlite3_open_v2(),and not prevIoUsly closed. Calling sqlite3_close() with a NULL pointer argument is a harmless no-op.

See also lists ofObjects,Constants,andFunctions.

原文地址:https://www.jb51.cc/sqlite/201873.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐