• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Accessing SQL Databases
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessing SQL Databases


  • Subject: Re: Accessing SQL Databases
  • From: Jonathan Monroe <email@hidden>
  • Date: Mon, 15 May 2006 12:46:17 -0500


On May 15, 2006, at 10:03 AM, Nick Zitzmann wrote:

On May 15, 2006, at 3:54 AM, Kenny Millar wrote:

I've looked through the ADC site and searched for variations of
"SQL" and "access sql tables" etc but cannot really find anything that tells
me what my options are for accessing SQL databases.


So what are my options? Do I need some third party library to do this?

No; you need to use ODBC (which has come with Mac OS X since Jaguar) and an MS-SQL driver.

There's a Carbon example on our website that shows a simple UI-based application that can create a table, insert a row and then fetch the row back again from a SQL Server database:


http://www.actualtechnologies.com/example.php

The meat of the example is in C, so it shouldn't take to much work to adapt it to a Cocoa UI. The application links with /usr/lib/libiodbc.a, which is included with OS X (as Nick mentioned).

A quick Version Tracker search reveals the following Cocoa ODBC examples:

http://www.germinara.it/FGMySqlOdbcCocoaTutorialEnglish.zip
http://www.germinara.it/cocoabsesql.htm

If you're interested, I can also give an example of how to connect using a "DSN-less" connection so you don't have to go through the DSN configuration step with the ODBC Administrator (in /Applications/Utilities).

Jonathan Monroe
Actual Technologies - ODBC for OS X

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Testing
  • Next by Date: Re: Rotating Image Button
  • Previous by thread: Re: Accessing SQL Databases
  • Next by thread: Re: Accessing SQL Databases
  • Index(es):
    • Date
    • Thread