Skip to Content.
Sympa Menu

freetds - Re: [freetds] Registering the ODBC Driver With unixODBC

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Michael Higgins" <mhiggins AT banfieldgroup.com>
  • To: "'FreeTDS Development Group'" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Registering the ODBC Driver With unixODBC
  • Date: Wed, 25 Apr 2007 15:38:09 -0700

> -----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







Archive powered by MHonArc 2.6.24.

Top of Page