I have an FMDB update query that is not working. Here is my code:
FMDatabase *db = [self openDatabase];
if (![db open]) {
return;
}
NSString *updateMeeting = [NSString stringWithFormat:@"UPDATE meetings SET MEETING_DESCRIPTION=\"%@\" WHERE MEETING_ID=\"%@\"",meeting.meetingDescription, meeting.meetingId];
[db beginTransaction];
[db executeQuery:updateMeeting];
[db commit];
[db close];
These are the things i've checked:
- The properties I pass are objects and are not nil.
- Some places online use \"%@\", some use '%@', some use %@ and some use ?. None of which worked for me.
I NSLoged my string and it looks like this:
UPDATE meetings SET MEETING_DESCRIPTION="AAA12" WHERE MEETING_ID="791D8251-2FC4-498B-85B3-C1002C04E329:F1C40061-1308-4179-B72E-7E3EEDB85E1A"
I thought maybe my data base cant find this meetingID so I ran a SELECT query for this messageID and found it.
I'm pretty much hopeless. Can anyone think of something i haven't tried?
Thanks