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.
- FMDB (SQLite only)
- FDO (SQLite only)
- 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
2009-12-29 11:39:25
+1 DEFINITELY use a wrapper. There's no good reason to use the sqlite C API directly.
Dave DeLong
2009-12-29 16:47:34