0
一些朋友和我正在开发cocos2d :)中的游戏,并且使用fmdb在其中进行一些设置。实际上我有这样的代码:fmdb fmresultset没有加载任何东西
的NSString *路径= [[一个NSBundle mainBundle] pathForResource:@ “MYDB” ofType:@ “源码”];
mainDB = [FMDatabase databaseWithPath:path];
if ([mainDB open])
NSLog(@"did open db");
else
NSLog(@"did not open db");
_stages = [[NSMutableArray alloc] init];
[mainDB open];
FMResultSet *FResult = [mainDB executeQuery:@"select * from stagesTable"];
NSLog(@"columns : %d",[FResult columnCount]);
如果([FResult下一])
的NSLog(@ “具有对象”);
else
NSLog(@“dont have objects”);
NSLog(@"with %d objects",[_stages count]);
[mainDB close];
但FResult不存储,请mainDB不开放,但列是0对象是0,它总是说,它没有任何对象。什么可能是错的?感谢:D !
TY,问题是,我不是加入分贝捆绑,通过logsErrors实现:)! –