Mac OS X has installed as it’s default ODBC manager. Most other Linux/UNIX system uses to manage the ODBC drivers. This is the main reason why there’s so much confusion on getting ODBC to work on Mac OS X. Is kind of like an API for any software to access any DBMS easily, regardless of what DBMS it is and what OS it’s running on.
Different software (e.g., R or Python) can utilize ODBC to access different DBMS through the following logic: Software - ODBC Manager - ODBC Driver for the DBMS - DBMS Server (Software: R, Python, etc.; DBMS: MySQL, MS-SQL, etc.). It doesn’t matter whether you use iODBC or unixODBC. Whichever one you use, just make sure the DBMS Driver and software you are using are configured/compiled to use with the same ODBC manager (usually set through the configure flags). For example, the R package RODBC and Python package pyodbc are compiled by default to use iODBC on Mac OS X. The DBMS drivers used must be compiled for use with iODBC.
Hi, I have tried to compile the IDE for my Mac OSX (because I have OSX ver 10.6.8 and the precompiled version was for 10.7!). (xtensa-lx106-elf-g++ returned 139). Sweet success! Blinkly blue light on pin 2 of NodeMCU 1.0. Now to compile an actual wifi sample! BTW any view on the two changes being pushed up to staging? Will test the e. What's a libiodbc and what goes in my Driver= lines in odbc.ini? Common Error Messages. [iODBC][Driver Manager]Data source name not found and no default driver. With iODBC, assuming you downloaded/installed/compiled it, you have a. Your application has loaded libiodbc successfully, and it has found an. An Automator script wraps the appropriate commands up and lets you place Kile in your Applications folder. I used the latest KDE 3.5.8. Wbr I will try to make this as analytic as I can, since I have not seen any other guide that delivers the full Kile power in Mac OS X.
For iODBC, one could add data source names (DSN’s) at /Library/ODBC/odbc.ini. For unixODBC, one could add DSN’s at /.odbc.ini.
My current setup utilizes iODBC. I will outline the instructions for setting up MySQL and freeTDS (MS-SQL) drivers for use with RODBC and pyodbc through iODBC. Install the MySQL. Driver should be at /usr/local/lib/libmyodbc5.so or /usr/local/lib/libmyodbc5w.so. Note: I’m unable to compile the driver from source on Mac OS X. FreeTDS is an open source ODBC driver to access MS SQL Server.
Install via Home Brew: ## install homebrew ruby -e '$( curl -fsSL ## install freetds brew install freetds Driver should be at /usr/local/lib/libtdsodbc.so (symbolic linked). Create /Library/ODBC/odbc.ini: sqlserver01 Driver=/usr/local/lib/libtdsodbc.so TDSVersion=4.2 Server=ip.address Port = 1433 Trace = Yes Description=my description # Database= # can't specify username and password for freetds mysql01 Driver=/usr/local/lib/libmyodbc5.so Server=hostname Port=3306 charset=UTF8 User=username Password=password # Database= ## can specify an actual database to each DSN Install pyodbc via sudo pip install pyodbc. Test connections in python: import pyodbc as p con1 = p.connect( 'DSN=sqlserver01;UID=username;PWD=password') con1.execute( 'select name from master.sysdatabases').fetchall con2 = p.connect( 'DSN=mysql01;UID=username;PWD=password') con2.execute( 'show databases;').fetchall Install R using the installer. Install RODBC in the R interpreter via install.packages('RODBC').
Test connections in R: library(RODBC) ch1. If one wants to use unixODBC on Mac OS X instead, note the following:. First install unixODBC via Homebrew with brew install unixodbc. Compile R from source to have it work with unixODBC (R binaries from the installer uses iODBC by default).
Can choose -with-odbc-manager=odbc when compiling RODBC. When compiling freeTDS, include the argument with-unixodbc (pass to Homebrew or when compiling manually). I’m unable to compile the MySQL Connector driver on Mac OS X from source (Homebrew or manually). Thus, it won’t work with unixODBC. I believe I tried unixODBC and MySQL Connector from macports, and those work. pyodbc only works with iODBC on Mac OS X (inspect file). Currently I can’t get pyodbc to work with unixODBC on Mac OS X.
UnixODBC comes with the isql command to access different DBMS from the command line interpreter. IODBC comes with the iodbctest and iodbctestw commands. The command isql works for me on Mac OS X when I set freeTDS up to work with unixODBC (e.g., accessing MS SQL Server). I couldn’t access MySQL server because the MySQL Connector driver was compiled for use with iODBC. If I use iODBC, I get the following for trying to access a MySQL server: $ iodbctestw 'DSN=sqlserver01;UID=username;PWD=password' iODBC Unicode Demonstration program This program shows an interactive SQL processor Driver Manager:.1008 1: SQLDriverConnectW = MySQLODBC 5.1 DriverPrompting is not supported on this platform. Please provide all required connect information. (0) SQLSTATE=HY000 1: ODBCConnect = MySQLODBC 5.1 DriverPrompting is not supported on this platform.
Please provide all required connect information. (0) SQLSTATE=HY000 When I try to access SQL Server, I get $ iodbctestw 'DSN=sqlserver01;UID=username;PWD=password' iODBC Unicode Demonstration program This program shows an interactive SQL processor Driver Manager:.1008 1: SQLDriverConnectW = FreeTDSSQL ServerLogin failed for user 'username'. (18456) SQLSTATE=42000 2: SQLDriverConnectW = FreeTDSSQL ServerUnable to connect to data source (0) SQLSTATE=08001 1: ODBCConnect = FreeTDSSQL ServerLogin failed for user 'username'. (18456) SQLSTATE=42000 2: ODBCConnect = FreeTDSSQL ServerUnable to connect to data source (0) SQLSTATE=08001 Don’t know why that is so. I guess it’s not too important to use an interactive interpreter.
What matter is that the driver works with R and Python. Perhaps I should consider or do more searching.
Ruby Examples (Ruby) SSH Tunnel for Database Connection (such as ADO, ODBC, JDBC, etc.) Demonstrates how to create an SSH tunneling client in a background thread of your application. This makes it possible to SSH tunnel database connections without the need for separate software (such as PuTTY) to be running.
Chilkat Ruby Downloads require 'chilkat' chilkatGlob = Chilkat:.new success = chilkatGlob. UnlockBundle( 'Anything for 30-day trial.' ) if (success!= true) print chilkatGlob. LastErrorText + ' n'; exit end tunnel = Chilkat:.new sshHostname = 'www.my-ssh-server.com' sshPort = 22 # Connect to an SSH server and establish the SSH tunnel: success = tunnel. Connect(sshHostname,sshPort) if (success!= true) print tunnel.
LastErrorText + ' n'; exit end # Authenticate with the SSH server via a login/password # or with a public key. # This example demonstrates SSH password authentication. Success = tunnel. AuthenticatePw( 'mySshLogin', 'mySshPassword') if (success!= true) print tunnel. LastErrorText + ' n'; exit end # The destination host/port is the database server. # The DestHostname may be the domain name or # IP address (in dotted decimal notation) of the database # server.
PutDestPort( 1433) tunnel. PutDestHostname( 'myDbServer.com') # Start accepting connections in a background thread.
# The SSH tunnels are autonomously run in a background # thread. There is one background thread for accepting # connections, and another for managing the tunnel pool. ListenPort = 3316 success = tunnel. BeginAccepting(listenPort) if (success!= true) print tunnel.
LastErrorText + ' n'; exit end # At this point the app may connect to the database server through # the SSH tunnel. The database connection string would # use 'localhost' for the hostname and 3316 for the port. # We're not going to show the database coding here, # because it can vary depending on the API you're using # (ADO, ODBC, OLE DB, etc. ) # This is where the application's database code would go. # Stop the background listen/accept thread: waitForThreadExit = true success = tunnel. StopAccepting(waitForThreadExit) if (success!= true) print tunnel. LastErrorText + ' n'; exit end # Close the SSH tunnel (would also kick any remaining connected clients).
Any Success Compiling Ruby-odbc For Mac Download
Success = tunnel. CloseTunnel(waitForThreadExit) if (success!= true) print tunnel.
Any Success Compiling Ruby-odbc For Mac Os
LastErrorText + ' n'; exit end © 2000-2016 Chilkat Software, Inc. All Rights Reserved.