I've made an app in which im using an sqlite database with fmdb wrapper for inserting and consulting data, the data is displayed into a table view, the problem is that when i run the app on an iphone 4 everything works well, but when i do it on an iphone 4s it doesn't..could someone please help me fix this issue.
Here are parts of my code:
Loading DB:
aPools = [[NSMutableArray alloc] init];
NSString *path = [[NSBundle mainBundle] pathForResource:@"poolsDB" ofType:@"sqlite"];
mainDB = [[FMDatabase alloc] initWithPath:path];
[mainDB open];
FMResultSet *fResult = [ mainDB executeQuery:@"SELECT * FROM poolsData"];
while ([fResult next]) {
poolsData = [fResult stringForColumn:@"Name"];
[aPools addObject:poolsData];
}
[mainDB close];
Saving :
-(void) saveIntoDB:(NSString *)name withVolume:(float)volume type:(NSString *)type andDesc:(NSString *)desc {
[mainDB open];
[mainDB executeUpdate:@"INSERT INTO poolsData (Name,Volume,Type,Desc) values (?,?,?,?)",name,
[NSNumber numberWithFloat: volume] ,type,desc, nil];
[mainDB close];
}
Could it be that the table view works in diferent ways beetwen devices?