Problem Executing Vacuum command in sqlite3 on iphone
I found this snippet for executing a vacuum of an sqlite3 db but it doesn't work.
c开发者_开发技巧an anyone tell me what is wrong with it.
sqlite3_exec(dataBase, "VACUUM;", 0, 0);
Thanks...
ok here's the solution to make the vacuum command work.
if(sqlite3_exec(dataBase, "VACUUM;", 0, 0, NULL) == SQLITE_OK) {
NSLog(@"Vacuumed DataBase");
}
that makes the command work however the app is locked out of the database while it runs.
精彩评论