Lefora Free Forum
login join
Loading
96 views

SQLLite3 Programming Examples NOT for iPhone Applications

Page 1
(items) 1–3 of 3
rookie - member
8 posts

I am looking for a simple SQL SELECT example in Xcode that does not tie itself directly to iPhone applications.  It seems that every posting I keep reading relates to programming the iPhone when it comes to this topic.  Is it different in any way from a Cocoa-based/Xcode application written strictly for the Mac?

regular - member
51 posts


Here's an Apple article relating to CoreData and SQLite:
http://developer.apple.com/mac/library/documentation/cocoa/conceptual/CoreData/Articles/cdPersistentStores.html

You can use cocoa CoreData objects (such as a dictionary) to be externally stored in an SQLite database.  However there are restrictions in the interaction of SQLite and cocoa because some operations are performed inside the library and don't offer the full cocoa experience.

Don't forget that Obj/C is C - so you can link sqlite and call it with its native api.  Of course, you'll abandon the CoreData capability of cocoa in this approach, however this might be good approach.  It really depends on your application.

__________________
rookie - member
8 posts

Hi Robin,
Somehow, I knew you'd be the one to respond to my post.
Let me see if I can clarify things a little more.
Using SQLLite Manager, I have already created the database infrastructure, tables and pre-loaded all the data I need from Excel spreadsheets into the appropriate tables. So, I have no plans to create or update any tables for this application.  All I will be doing is to extract the data and display them in specific text fields.

If you look at the XIB called ExamReview.xib, the window there will have several fields that will be populated from the data extracted from the database tables.

I was making the assumption that I will be constructing a NSMutualTableArray that will contain all the necessary data from the SQL SELECT statement I intend to use to pull that information.  That will be the extent of what I will be doing with SQL in my application. The rest of the code will use the array to go through the records one at a time.

The other features that I'm building into the app, will perform similar SELECTS, and nothing more.  The data will be different and will be used as I've architected into my specs.

So, I really do not want to do anything fancy here.  The database will be accompanying the application as part of the package down the line (if I ever get that far!!)

Am I missing something somewhere?
Thanks,
Jack

Page 1
(items) 1–3 of 3

Locked Topic


You must be a member to post in this forum

Join Now!