0

電話プログラミングは初めてです。配列カウントと配列objectAtindex値をデータベースに保存したいのですが、保存方法を教えてください。

 NSLog(@"%@",[tapCollection1 objectAtIndex:i]);
 NSLog(@"%i",[array11 count]);

NSString *insertSQL = [NSString stringWithFormat: @"insert into Taukyblauky(taukyid,blaukyid) values (\"%\",\"%i\")",[tapCollection1 objectAtIndex:i],[array11 count]];

[tapCollection1 objectAtIndex:i] と [array11 count] を挿入する正しい方法は何ですか?

 Inside that  [tapCollection1 objectAtIndex:i] it contain some value like this 3.
 Inside that [array11 count] it contain some value like this 2.

データベースにobjectAtindex値と配列カウント値を挿入する正しい方法は何ですか。ありがとうアスラム

4

1 に答える 1

0

いいえ、CoreDataはORMです。クエリ(特に挿入)を書き出すことはありません。コンテキストでsaveを呼び出すことができるはずです。

NSEntityDescriptionのinsertNewObjectForEntityNameを確認してから、ManagedObjectContextに保存します。

于 2013-03-20T14:41:24.780 に答える