• 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: ODBC
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ODBC


  • Subject: Re: ODBC
  • From: Brian Weitzner <email@hidden>
  • Date: Mon, 24 Jul 2006 17:37:32 -0400


On Jul 23, 2006, at 9:23 PM, Scotty's Lists wrote:


On Jul 21, 2006, at 5:31 PM, Brian Weitzner wrote:

Hi, I'm a student and I am new to cocoa programming. For a project I am working on, I need to connect to, submit queries to and display the results of those queries of a database via an ODBC driver. I'm having a lot of trouble finding documentation on this, but I can't imagine it's all that difficult. Any help would be greatly appreciated. Thank you.

Brian,

I've not had an opportunity to do any ODBC programming, but I have used Google. :-)

Mac OS X ships with the IODBC libraries in /usr/lib, headers in / usr/include.

Take a look at <http://www.iodbc.org/index.php?page=docs/ macosodbcstory/index> for more info on using them on Mac OS X.

This might also be useful: <<http://docs.openlinksw.com/st/ iodbcappsmacos.html#iodbcmacosx>

I don't believe there is a native Cocoa API, but you can call into the iODBC C libraries from Cocoa code without any trickiness.

Objective-C is C with extensions to enable object-oriented programming. If you're not new to C, you'll already know how to use C libraries in Cocoa; it's the same as using them from C or C++.

Scotty



Please forgive me as I am new to both Cocoa and databases. I am running firebird database. So through terminal, I use:


$ isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> connect 'DbPATH' user UID password PASSWD;

to connect to my database. So in my project, in the class that is responsible for accessing the database, i have #include <isqlext.h> (which calls isql.h and iodbcunix.h) in the header and implementation files. So if I use DbConn(db, UID, PASSWD), my app crashes.... which tells me that this is not the right command or I need to include more files. So my question has now evolved into how do I use obj-C to communicate with my database? Is there any documentation on how to accomplish this or has anyone had experience with this? Thanks for the help and for your patience!

--
Brian Weitzner




_______________________________________________ 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
  • Follow-Ups:
    • Re: ODBC
      • From: "Scotty's Lists" <email@hidden>
    • Re: ODBC
      • From: Nick Zitzmann <email@hidden>
References: 
 >ODBC (From: Brian Weitzner <email@hidden>)
 >Re: ODBC (From: "Scotty's Lists" <email@hidden>)

  • Prev by Date: Re: Re: Re: Re: What is serializaton?
  • Next by Date: RE: How do I display a path like in PathFinder 4, the file path
  • Previous by thread: Re: ODBC
  • Next by thread: Re: ODBC
  • Index(es):
    • Date
    • Thread