Jul 1, 2015, 10:29 AM
Post #3 of 5
Ok. I installed unixodbc, unixodbc-dev, libodbc1, libtool, autotools-dev and several other packages that comes with unixodbc. I don't use ODBC much so I'm a newbie, and the Perl syntax for DBI::ODBC is:
Re: [FishMonger] How to use DBI with MSSQL server?
[In reply to]
$dbh = DBI->connect('dbi:ODBC:DSN=mydsn', 'user', 'password');
I vaguely remember what a DSN is, I think it's a file with info for ODBC. But how do I make a DSN on Ubuntu 14.04?
EDIT: I found a dir /etc/ODBCDataSources but there is no odbc.ini in it. Do I have to make the odbc.ini myself? I found this helpful but it does not mention installing an MSSQL odbc library driver: https://help.ubuntu.com/community/ODBC
Found these files but none look like they belong to MSSQL.
chuck@ubuntucomp:/etc/ODBCDataSources$ ls -l /usr/lib/odbc
-rw-r--r-- 1 root root 567536 Sep 24 2013 virtodbc_r.so
-rw-r--r-- 1 root root 559216 Sep 24 2013 virtodbc.so
-rw-r--r-- 1 root root 609104 Sep 24 2013 virtodbcu_r.so
-rw-r--r-- 1 root root 600784 Sep 24 2013 virtodbcu.so
In my DSN do I point to virtodbc.so?
(This post was edited by bulrush on Jul 1, 2015, 10:43 AM)