This is the first time I use Sqlite in my app. So I follow this tutorial. I edit the database a bit to suit my purpose:
CREATE TABLE appointmentInfo(clientInfoID integer primary key, customername text, personname text, position text,appointmenttime text)
Then I query with this code:
NSString *query = [NSString stringWithFormat:@"insert into appointmentInfo values(null, '%@', '%@', '%@', '%@')", self.customernameTF.text, self.personnameTF.text, self.positionTF.text,self.meetingtimeTF.text];
[self.dbManager executeQuery:query];
I keep getting errors:
DB Error: unknown error
But when I check the sql file, the record is captured.
What seems to be the problem?
Aucun commentaire:
Enregistrer un commentaire