【发布时间】:2011-04-02 13:55:22
【问题描述】:
为 SQLite3 db-selecct 查询运行以下准备语句时,我收到 SQLLite 错误 21“Library routine called out of sequence”:
sqlite3 *lDb;
sqlite3_stmt *lStmt;
NSNumberFormatter *lNbrFmt = [[[NSNumberFormatter alloc] init] autorelease];
// Define SQL statement
NSString *lSql = @"SELECT section, language, title, description"
@" selector-x-pos, selector-y-pos, gps-x-pos, gps-y-pos"
@" FROM sections"
@" ORDER BY section ASC";
lSqlResult = sqlite3_prepare_v2(lDb, [lSql UTF8String], -1, &lStmt, NULL);
NSLog(@"%@", [NSString stringWithUTF8String:sqlite3_errmsg(lDb)]);
我做错了什么?
【问题讨论】:
-
恭喜你搞定了!您能否重新格式化遗留问题和答案,以便将来的访问者可以轻松解决相同的错误?如果没有,您应该完全删除该问题。谢谢!
-
不用担心,只是编辑它...
标签: iphone objective-c xcode sqlite