iphone - SQLite。不能添加超过 1000 行

标签 iphone objective-c ios sqlite fmdb

我正在尝试向我的 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/

相关文章:

iPhone map 套件 : select location (coordinates) manually by touching MKMapView

objective-c - 在 NSOutlineView 中托管 NSView 的图层

ios - 如何使用 Storyboard 中的 View 以编程方式创建 UIViewController

objective-c - 了解应用程序在 cocoa mac OSX 中是否处于非事件状态的最佳方法?

objective-c - NSString 实例将其类报告为 NSCFString

ios - 通过带字幕的 URL 方案流式传输到 iOS 版 VLC

ios - 在 iOS 8 下启用引导访问的情况下点击 UIWebView 中的链接时显示的警报

ios - 如何计算文件夹的大小?

iphone - 分组 UITableView 中第一个和最后一个单元格的自定义圆角

iphone - 自定义绘制的 UITableViewCell 中的可访问性