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: Robert Denton <robert AT headsprout.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Registering the ODBC Driver With unixODBC
  • Date: Thu, 26 Apr 2007 12:33:13 -0400

And the winner is.... the esteemed Mr. Higgins! Thanks for your insight this resolved my problem and the script is working as it should!

Robert


On Apr 25, 2007, at 6:38 PM, Michael Higgins wrote:

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



_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds






Archive powered by MHonArc 2.6.24.

Top of Page