I am inserting data in sqlite table and then showing that data in table View. problem is that when i insert ABC then it show in table ABC, but when i again insert XYZ then it shows only XYZ instead of ABC and XYZ. this is method to select data which i inserted:
NSMutableArray *tempArray3 = [[NSMutableArray alloc] init];
self.libraryArray = tempArray3;
[tempArray3 release];
[Coffee getInitialDataToDisplayL:[self getDBPath]];
Adding data method:
- (void) addCoffee:(Coffee *)coffeeObj {
//Add it to the database.
[coffeeObj addCoffee];
int countone=[libraryArray count];
NSLog(@"count Before Adding is %d",countone);
//Add it to the coffee array.
[libraryArray addObject:coffeeObj];
int count=[libraryArray count];
NSLog(@"count After Adding is %d",count);
NSLog(@"Successfully added");
}
NSLog
statements report) for us to possibly help you diagnose what's going on. – Rob Apr 18 at 7:17