Skip to Content.
Sympa Menu

freetds - [freetds] Connecting to MS SQL Database with unixODBC, freetds, and perl

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: John Brown <faight AT yahoo.com>
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] Connecting to MS SQL Database with unixODBC, freetds, and perl
  • Date: Tue, 15 Nov 2005 14:48:41 -0800 (PST)

I am attempting to connect to an MSSQL Database with unixODBC, freetds, and
perl. I can connect
with tsql and isql, but when I run the perl connectivity test I get the
following error:

Unable to connect to server [unixODBC][Driver Manager] Data source name not
found, and no default
driver specified (SQL-IM002) (DBD: db_login/SQL Connect err=-1)

I have corresponding entries in the freetds.conf, the odbc.ini, and the
odbcinst.ini files.

I can connect with isql and return a recordset manually.

I am using the following perl command to connect

use DBI;
my $dbh = DBI->connect("dbi:ODBC:server=$servername", $username, $password,
(PrintError => 0));





__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com



  • [freetds] Connecting to MS SQL Database with unixODBC, freetds, and perl, John Brown, 11/15/2005

Archive powered by MHonArc 2.6.24.

Top of Page