tags:

views:

61

answers:

1

Hiii, I am creating a preference Panes (in system preferences).I want to fetch data from sql database.....HOw do i do that??? plz tell the code for basic sql database connectivity in cocoa...

+2  A: 

If you really want to fetch from a SQL database, there are a number of wrapper libraries you could use.

  1. FMDB (SQLite only)
  2. FDO (SQLite only)
  3. CocoaMySQL (MySQL only)

Depending on your data needs, I might actually leverage a scripting language and call that (somehow) from your PrefPane. For example, create a bundle using PyObjC or MacRuby and use SQLAlchemy or ActiveRecord as appropriate.

RyanWilcox
+1 DEFINITELY use a wrapper. There's no good reason to use the sqlite C API directly.
Dave DeLong