[freetds] Registering the ODBC Driver With unixODBC

Robert Denton robert at headsprout.com
Thu Apr 26 12:33:13 EDT 2007


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




More information about the FreeTDS mailing list