Code example needed for COCOA Objective-C ODBC database access. 500 point question.

I need code that shows as simply as possible how to query a database via an ODBC connection using COCOA and Objective-C and put the results of the query in an array or text box.

What im trying to do is enter an employee number into a text box, query the db for that person, then update a field from the results. Also, I will more than likely put the results of all of the employees into a list box.

Simplicity is the key!
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NeXT's DBKit was the original Obj-C ODBC interface in NeXTStep.  However, it was a 2-tiered model, was woefully inadequate, and was replaced with Enterprise Objects Framework (EOF).   Unfortunately when the OpenStep specification was written, EOF was pulled from the core frameworks and the technology was incorporated into WebObjects, where it remains today.   Unfortunately if you want to use Objective-C, you are stuck using WebObjects v4.  Later versions are Java only.  [A gross error on Apple's part, IMHO (but then I believe WO has been grossly mismanaged by Apple since the NeXT buyout).]

Mac OS X 10.4 introduced CoreData, which supports database persistence.  AFAIK, the only database it currently supports is SQLite.  I imagine that some of the EOAdapter (drivers for individual databases) technology might be migrated to CoreData in the future, but I would not hold my breath.

Going outside Apple-supplied technology, there are several third party Obj-C ODBC packages available:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
JasonOutlawAuthor Commented:
I found out a lot of this doing research while i was waiting on someone to give me an example.
What I found was if you install the iODBC framework from and download the carbon app example they have, it can very easily be ported to objective c. Thanks for the help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.