I am trying to insert multiple row data same time to the sqlite database.But for example I have a value.I am getting that from my api.And in this value I have 2000 data.I am just adding 1 row and in that row I Can see 2000 data.
for (NSDictionary *customerDictionary in customerArray) {
Kart *kart = [Kart customerWithName:[customerDictionary valueForKey:@"adi"]];
[_kartList addObject:kart];
}
And I am using FMDB for the sqlite.
EDIT
I can add the one data to the sqlite db with that.But when I try to add another object to the database its adding all datas to the my database in one row.
Its just adding one row and correct data
[database executeUpdate:@"INSERT OR REPLACE INTO KartDB (adi) VALUES (?)" withArgumentsInArray:kart.adi];
Its adding all data from kart.adi and kart.adi2 in one row.
[database executeUpdate:@"INSERT OR REPLACE INTO KartDB (adi,adi2) VALUES (?,?)" withArgumentsInArray:[NSArray arrayWithObjects:kart.adi,kart.adi2, nil]];
Can you give me a suggestion ?