开发者

Problem Executing Vacuum command in sqlite3 on iphone

开发者 https://www.devze.com 2023-03-05 00:50 出处:网络
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.

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

精彩评论

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