sqlite3 *database; sqlite3_stmt *statement; NSString *dPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@\"UserData.sqlite\"]; const c
try executing commit, so setting the db to autocommit
// COMMIT
const char *sql2 = "COMMIT TRANSACTION";
sqlite3_stmt *commit_statement;
if (sqlite3_prepare_v2(database, sql2, -1, &commit_statement, NULL) != SQLITE_OK) {
NSAssert1(0, @"Error Message: '%s'.", sqlite3_errmsg(database));
}
success = sqlite3_step(commit_statement);
if (success != SQLITE_DONE) {
NSAssert1(0, @"Error Message: '%s'.", sqlite3_errmsg(database));
}
}