in reply to Problems with DBD::ODBC and DBD::Sybase
I don't use DBD::Sybase so cannot comment on #1 but I do know about DBD::ODBC and a little about FreeTDS. For a background on ODBC in unix see http://www.easysoft.com/developer/interfaces/odbc/linux.html - I know it says Linux/UNIX but most of it applies to OSX too.
OSX comes with a modified iODBC driver manager and from the looks of things you are already using that - or DBD::ODBC would not have built. You need to add your FreeTDS ODBC driver with the ODBCAdmin GUI program then create a datasource. I don't own a MAC so I'm not sure if FreeTDS includes the libraries to add a driver with ODBCAdmin but if it does not then you can hand edit the odbcinst.ini file. Use iodbc-config --odbcinstini to find where the odbcinst.ini file is and and add a driver something like this:
[ODBC Drivers] FreeTDS = Installed [FreeTDS] Driver = /path/to/libtdsodbc.so
Then fire up ODBCAdmin and create your data source. You'll need to add attributes to say where your sql server is, what protocol to use, username, password etc - best to consult the FreeTDS home page for that. Here again, you can just run iodbc-config --odbcini and it will tell you which files to use to define your user and system data sources in. I've included a very simply data source definition I used some time ago with FreeTDS and MS SQL Server below.
[freetds] Driver = FreeTDS Description = connection to RS machine Trace = No Server = 192.168.250.71 #Database = pubs TDS_Version = 7.0
ODBC is pretty much the same across unix-like platforms but typically OSX has it differences e.g., you get the iODBC driver manager by default whereas most of the rest of the unix world use the unixODBC driver manager. Also, it may be possible FreeTDS cannot get its settings from the odbc.ini file directly - it needs special parts of the ODBC driver manager (SQLPrivateProfileString etc to do that). If that is the case, you can put the settings in your freetds.conf file but the freetds page is the best place to start researching that. I don't own or have a MAC to hand right now but I got DBD::ODBC working on OSX in the past.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Problems with DBD::ODBC and DBD::Sybase
by rwitmer (Initiate) on May 28, 2009 at 20:46 UTC | |
by mje (Curate) on May 29, 2009 at 07:56 UTC | |
by rwitmer (Initiate) on May 29, 2009 at 18:08 UTC |