www.un.org/Depts/DGACM/index_french.htm
I need to store all the names existing in namesArray
using coredata
.
如何做到这一点?
是否需要使用qlite管理人创建任何数据库,如<代码>。
www.un.org/Depts/DGACM/index_french.htm
I need to store all the names existing in namesArray
using coredata
.
如何做到这一点?
是否需要使用qlite管理人创建任何数据库,如<代码>。
没有必要使用管理人创建<条码>。 你们应该通过在网上发现的一些辅导材料,例如:Here或Here<>Here<>。
基本上需要节省在<编码>上的数据模型中。
//Coredata saving
self.theAppDel=[[UIApplication sharedApplication] delegate];
NSManagedObjectContext*context=[self.theAppDel managedObjectContext];
NSManagedObject*object=[NSEntityDescription insertNewObjectForEntityForName:@"Contacts" inManagedObjectContext:context];
NSError*error=nil;
[object setValue:[namesArray objectAtIndex:0] forKey:@"name"]; //for saving first name
<>1>。 树立你的榜样。
<>2>。 查阅
<>3>。 假设你生成了与姓名接触的实体说明。 在您的阵列中,加上每个物体的编号为< 代码>:。 (假定你会创造)
这是一个简短的例子,但你应该通过辅导和阅读pple文件。
<>光线> 正如奥德拉提到我先前的解决办法只增加了最后的内容。 添加以下内容:
I think that iNoobs answer would not work - the loop would overwrite the value several times (only last name would be saved). In every case reading the tutorials is good idea. Maybe the answer you are looking for is here: Saving an NSMutableArray to Core Data
...... 我知道你明确说过“核心数据”,但就在这样的情况下,你也可以使用不同的储存,如
[[NSUserDefaults standardUserDefaults] setObject:namesArray forKey:@"namesArray"];
之后使用:
myArray= [[NSMutableArray alloc] initWithArray:[[NSUserDefaults standardUserDefaults] objectForKey:@"namesArray"]];
当然,NSUserDefaults只能用于少量数据。
Good;
I have values being cut off and would like to display the full values. Sqlite3 -column -header locations.dbs " select n.namelist, f.state, t.state from names n left join locations l on l.id = n.id ...
I ve had fine luck using SQLite with straight, direct SQL in Android, but this is the first time I m wrapping a DB in a ContentProvider. I keep getting a null pointer exception when calling ...
I got this error: OperationalError at / unable to open database file Things I ve tried so far are setting the absolute path of my dev.db file in the settings.py. I ve tried adding www-data to my ...
I am in the process of developing a desktop application that needs a database. The application is currently targeted to SQL Express 2005 and works wonderfully. However, I m not crazy about having ...
Optimizing SQLite is tricky. Bulk-insert performance of a C application can vary from 85 inserts per second to over 96,000 inserts per second! Background: We are using SQLite as part of a desktop ...
When we are using any gear enable site, and we go offline the gear automatically creating folder with /dbName#database ... assume 2 diff. website is there www.abc.com and www.xyz.com. when I go ...
How can I get metadata / constraints (primary key and "null allowed" in particular) for each column in a SQLite v2.8 table using PHP5 (like mysql_fetch_field for MySql)? sqlite_fetch_column_types (OO:...
I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...