Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Use the myodbc driver with Excel v.X via MS Query Apps
Here are the steps you need to make Excel v.X work with the open source myodbc
driver.

[Editor's note: I have not tested this hint myself...]

  1. Download version 3.51 the binary of the myodbc driver.

  2. Uncompress the downloaded file, and save it somewhere like ~/Public/myodbc. The folder should contain the following files:
    • COPYING
    • libmyodbc3-3.51.04.so
    • libmyodbc3.a
    • libmyodbc3.la
    • libmyodbc3.lai
    • libmyodbc3.so
    • README
    • RELEASE-NOTES

  3. Create two files, ODBC.preference and ODBC Installer.preference with UNIX style end-of-line markers. Create both of these files in ~/Library/Preferences. Here is a content of those files (all values could be changed):

    ODBC.preference
    [ODBC Data Sources]
    myodbc = myodbc

    [myodbc]
    Driver = /Users/username/Public/myodbc/libmyodbc3-3.51.04.so
    Description = myodbc
    Server = 127.0.0.1
    UID = dbusername
    Password = dbpassword
    Database = dbname
    ODBC Installer.preference:
    [ODBC Drivers]
    myodbc = Installed

    [myodbc]
    Driver = /Users/username/Public/myodbc/libmyodbc3-3.51.04.so
    Setup =
  4. Download and install iODBC SDK for Jaguar (or whatever) from openlinksw.com (as I understand it, it's distributed under the GPL). The installer installs the following frameworks and extensions:
    • /Library/Frameworks/iODBCinst.framework
    • /Library/Frameworks/iODBCadm.framework
    • /Library/Frameworks/iODBC.framework
    • /Library/CFMSupport/iODBC CFM Bridge
NOTE: The iODBC SDK installer installs iODBC Administrator application. That application can create ODBC.preferences and ODBC Installer.preference. However, it crashes every time you want configure data source (BTW it doesn't crash for openlink mysql lite driver), so just run iODBC Administrator application, add your driver and afterwards, edit the preference files manually.
    •    
  • Currently 4.33 / 5
  You rated: 5 / 5 (3 votes cast)
 
[15,974 views]  

Use the myodbc driver with Excel v.X via MS Query | 7 comments | Create New Account
Click here to return to the 'Use the myodbc driver with Excel v.X via MS Query' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
fixed link
Authored by: nvdingo on Dec 12, '02 01:11:20PM

the link to the mysql driver shows up as
http://www.macosxhints.com/www.mysql.com/Downloads/MyODBC3/MyODBC-3.51.04-apple-darwin-powerpc.tar.gz

it should be http://www.mysql.com/Downloads/MyODBC3/MyODBC-3.51.04-apple-darwin-powerpc.tar.gz

That's why it says file not found.



[ Reply to This | # ]
ODBC Administrator vs iODBC
Authored by: davendasora on Dec 13, '02 12:28:18PM

I was not able to get the MyODBC driver to work. Excel never recognized the DSN I setup with the .properties files shown above. (modified, of course to point to my DB)

It works just fine with the openlink mysql lite driver (and the SQL Server lite driver also)

The main thing that I'm confused about is why, when apple supplies its own ODBC Administrator program - Applications/Utilities/ODBC Administrator - which was written by openlink (http://www.openlinksw.com/press/macosx1012.htm), do we need another ODBC Admin program ALSO written by openlink?

Of course, Microsoft Query does not recognize the Apple ODBC implimentation at all. It reports "ODBC is not installed..." if you don't install iODBC. Once you install iODBC then everything seems to work just fine (well, with THEIR drivers it does anyway).

Why did Microsoft make Query work only with a third party solution and not with the built-in solution, especailly when the built-in was built by the same third party! (Confused yet?!?!) And on top of that, Microsoft doesn't document anywhere that you need to use iODBC of ODBC Administrator.

And the icing on the cake is that Apple has absolutely no documentation on ODBC Administrator.

Sheesh.



[ Reply to This | # ]
ODBC Administrator vs iODBC
Authored by: dmarkman12345 on Dec 16, '02 01:51:45PM

as I learned ms query reports that odbc isn't installed
if it can not find file "iODBC CFM Bridge"
from the folder /Library/CFMSupport

iODBC SDK from openlink www.openlinksw.com
will install that file for you



[ Reply to This | # ]
ODBC Administrator vs iODBC
Authored by: dmarkman12345 on Dec 16, '02 03:06:53PM

as I can tell Apple's ODBC Administartor does only one thing:
it create/edit odbc.ini or odbcinst.ini from /Library/ODBC folder
for system Data sources or from ~/Library/ODBC for user data sources
so, practically you don't need that administrator at all: just edit
those files by yourself.
you can find information about format of odbc init files somewhere
on the web or from driver's specific documentation

MS Query, however, don't use preferences file from /Library/ODBC folder
it uses files from /Library/Preferences or ~/Library/Preferences
I think MS Query can not communicate with Apple's ODBC directly, because
MS Query is CFM based application and you need special software, like
cfm iodbc bridge. but it's just my speculations



[ Reply to This | # ]
iODBC error following myodbc tip
Authored by: mike_a on Jan 13, '03 03:27:35PM

http://www.macosxhints.com/article.php?story=2002121206540038

I followed the tip as above, but when I test the connection I get the following errors in succession:

IM003
[iODBC][Driver Manager]Specified driver could not be loaded.

00000
[iODBC][Driver Manager]not a Mach-O MH_BUNDLE file type

Any ideas what the problem is?
I noticed that when I got the latest versions of myODBC it is version 3.51.05 not 3.51.04 and there are no .so files, but instead .dylib. Does this make a difference?



[ Reply to This | # ]
iODBC error following myodbc tip
Authored by: mike_a on Jan 27, '03 12:15:25PM

I downloaded the older version (3.51.04) and some progress has been made.

Now when I test the DSN, the error message is

HY000
[MySQL][ODBC 3.51 Driver]No DSN entered

Judging from the message, it appears the driver has been found and is being used. I'm not sure what the message means. The DSN appears in the iODBC interface under User Data Sources. Any ideas?

ma



[ Reply to This | # ]
iODBC error following myodbc tip
Authored by: mike_a on May 19, '03 08:51:59AM

Ignore the test return. It returns false negatives. The connection works if I just click OK on through to the Query interface.



[ Reply to This | # ]