[sqlite executeQuery:@"UPDATE UserAccess SET Answer ='Positano';"];
NSArray *query2 = [sqlite executeQuery:@"SELECT Answer FROM UserAccess;"];
NSDictionary *dict = [query2 objectAtIndex:0];
NSString *itemValue = [dict objectForKey:@"Answer"];
NSLog(@"%@",itemValue);
He is printing Positano at that moment. But when I just print without asking for an update again. I get an old record, which is Paris. I tried [sqlite commit]; which also does not work. Even if I create a simple table, it runs the first time, and then again, when I click the Create button, it says that the table already exists. BUT, when I restart again, it creates the table again instead of giving me the error that the table already exists.
What am I doing wrong??? I am using the http://th30z.netsons.org/2008/11/objective-c-sqlite-wrapper/
wrapper.
Regards, Beginners
source
share