sqlite3_stmt *stmt;
sqlite3 *database;
if (sqlite3_open(dtPath.c_str(), &database) == SQLITE_OK &&
sqlite3_prepare_v2(database, String::createWithFormat("select * from data where level = %i", level + 1)->getCString(), -1, &stmt, nullptr) == SQLITE_OK &&
sqlite3_step(stmt) == SQLITE_OK)
{
// do somthing..
}
int statusCode = (sqlite3_exec(database, "insert into data values(20, 'abc')", NULL, NULL, NULL));
CCLOG("%i", statusCode);
当我运行时,statusCode = 5(SQLITE_BUSY),我不知道为什么?请帮帮我!!