我在SQLite文件中保存了核心数据,但我很好奇coredata中的表名是什么我有三个实体,其中一个是学生。如何在SQLite文件中保存核心数据
在尝试使用SQLite语句来读它,它不能进入,而
const char *sqlStatement = "SELECT * FROM students";
sqlite3_stmt *compiledStatement;
if(sqlite3_prepare_v2(database, sqlStatement, -1, &compiledStatement, NULL) == SQLITE_OK) {
while(sqlite3_step(compiledStatement) == SQLITE_ROW) {
NSString *aName = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 1)];
NSLog(aName);
}
}
任何建议,为什么不进入if语句?
作为第一步,我会找出它返回的错误代码并与以下对比:http://www.sqlite.org/c3ref/c_abort.html – badgerr 2011-05-23 15:55:21