• 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
MyODBC w/Cocoa?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MyODBC w/Cocoa?


  • Subject: MyODBC w/Cocoa?
  • From: "David Piasecki" <email@hidden>
  • Date: Wed, 21 Apr 2004 11:43:21 -0700

Has anyone tried using MyODBC in Cocoa? I've followed the CocoaMySQL
source before, but this time I want to use standard C++ with ODBC
instead of Objective-C so I can use the same source code on other
platforms. For some reason, the source below compiles just fine when I
#include <sql.h>, but I get the runtime error "ZeroLink: unknown symbol
'_SQLAllocEnv'". I have the libmyodbc3.bundle library included in my
project, but somehow it seems my runtime environment doesn't recognize
SQLAllocEnv. I would guess it doesn't recognize the other functions
either. I'm not sure if this is the best list to ask this question, but
it's the only one I'm familiar with at the moment.

SQLAllocEnv(&henv);
SQLAllocConnect(henv,&hdbc);
rc = SQLConnect(hdbc,(SQLCHAR *)"datasource",SQL_NTS,NULL,0,NULL,0);

// Deallocate handles and display error message
if( !MYSQLSUCCESS(rc) )
{
SQLFreeEnv(henv);
SQLFreeConnect(hdbc);
printf("Could not connect to database");
}

rc = SQLAllocStmt(hdbc,&hstmt);

David
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: MyODBC w/Cocoa?
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Miniature view
  • Next by Date: Re: Archiving NSTableViews
  • Previous by thread: Re: Miniature view
  • Next by thread: Re: MyODBC w/Cocoa?
  • Index(es):
    • Date
    • Thread