void C
sqliteDB::Close() { if(m_db) {
sqlite3 *db = m_db; m_db = NULL; int rc =
sqlite3_close(db); while( rc ==
sqlITE_BUSY) { // set rc to something that will exit the while loop rc =
sqlITE_OK;
sqlite3_stmt * stmt =
sqlite3_next_stmt(db,NULL); if(stmt != NULL) { rc =
sqlite3_finalize(stmt); if(rc ==
sqlITE_OK) { rc =
sqlite3_close(db); } } } } }
原文链接:https://www.f2er.com/sqlite/201710.html