开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜