[freetds] Registering the ODBC Driver With unixODBC
Michael Higgins
mhiggins at banfieldgroup.com
Wed Apr 25 18:38:09 EDT 2007
> -----Original Message-----
>
> Is there anything specific I need to do to make perl aware of
> the freetds driver? Here is my set up:
Not really. It works just like ODBC on windoze.
[]
> my $data_source = 'driver={SQL
> Server};Server=<192.168.0.149>; database=<userFeedback>
> ;uid=<testUser>; pwd=<testPass>;';
>
Since I just got this set up for myself...
odbc.ini:
[ODBC Data Sources]
TEST = Microsoft SQL Server 2000
[TEST]
Driver = /usr/lib/libtdsodbc.so
Description = TEST Data
Trace = No
Server = 192.168.100.250
Database = TEST
;Port = 4444
TDS_Version = 8.0
----------------
/etc/freetds.conf
[SERVER]
host = 192.168.100.250 # server.test.local
port = 1433
tds version = 8.0
-----------------
#!/usr/local/bin/perl
#
use DBI;
my $dbh = DBI->connect("dbi:ODBC:TEST", 'DOMAIN\user', 'domainpwd',
{PrintError => 1, RaiseError => 1, LongTruncOk=>1});
die "Unable for connect to server $DBI::errstr"
unless $dbh;
. . .
> I do not believe that I need to tell it to use DBD::ODBC.
Right. HTH.
Cheers,
--
Michael Higgins
More information about the FreeTDS
mailing list