Re: importing sqlite data into a core data "database"
Re: importing sqlite data into a core data "database"
- Subject: Re: importing sqlite data into a core data "database"
- From: John Velman <email@hidden>
- Date: Sat, 12 Jul 2008 20:25:39 -0700
Thanks, Chris,
Using the SQLite 3 api as you suggest sounds good, but there are a couple
of things that must be obvious to the initiated, but not to me (yet).
As I understand, the SQLite 3 api is a C api. Can I do C function calls
directly from Objective C? Seems plausible, since Obj C is an extension of
C, and if I understand, Objective C is translated into C during the
compile.
If that's OK so far, how about linking? Is Linking to the SQLite library
transparent from XCode?
I'd be happy to be pointed to the right documentation! I've read a few
hundred pages in the past week, but haven't come across anything directly
related to this.
Thanks,
John Velman
On Sat, Jul 12, 2008 at 05:27:56PM -0700, Chris Hanson wrote:
> On Jul 12, 2008, at 4:54 PM, John Velman wrote:
>
>> So, being new to Cocoa, XCode, objective-c, How do I get my data into my
>> new Cocoa / core data "database"?
>>
>> I can think of two approaches off hand:
>
>> 2) writing an import routine for my application, using NSTask (?) and
>> sqlite3. This would likely only be used once.
>
> 3) Write an import routine for your application using the SQLite 3 API in
> <sqlite3.h>.
>
> Just prepare and step through queries of your old data using the raw SQLite
> 3 API, and insert new instances of your Core Data entities and set the
> appropriate properties on them as you go.
>
> -- Chris
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden