我正在尝试向我的 SQLite 数据库(使用 fmdb)添加 10k 行,但写入在 1000 行时停止。而且我没有任何错误或警告。我的代码:
NSString *queryString = [NSString stringWithFormat:@"insert into histories (storyid, text, date, storyurl) values (%li, ?, ?, ?)",history.storyIndex];
if ([self.db open]) {
if([self.db executeUpdate:queryString, history.storyText, history.storyDate, history.storyUrl]) {
NSLog(@"history added");
}
}
有什么建议吗?
最佳答案
对于遇到相同问题的任何人...请确保您的 sqlite 查看器没有将查询的输出限制为 1000 个结果。
只是在同样的问题上浪费了几分钟,答案就这么简单!
关于iphone - SQLite。不能添加超过 1000 行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13118610/