[freetds] Connecting to MS SQL Database with unixODBC, freetds, and perl
John Brown
faight at yahoo.com
Tue Nov 15 17:48:41 EST 2005
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
More information about the FreeTDS
mailing list