I'm sure I'm overlooking something really simple, but I can't find any
documentation to help troubleshoot my problem.
When running a cgi script that uses DBI and the DBD::ODBC pm, this is error
message is deposited into my www error logs.
DBI->connect(SQL) failed: [unixODBC]tds_connect failed (SQL-08001)(DBD:
db_login/SQLConnect err=-1) at /cgiscript.cgi line 100
Connecting : [unixODBC]tds_connect failed (SQL-08001)(DBD:
db_login/SQLConnect err=-1) at /cgiscript.cgi line 100.
Here are my specs: RedHat 7.2 unixODBC, Freetds, and DBD::ODBC
As you can see below, I am able to connect to the database using the isql
command.
[root@server root]# isql SQL USER PASS
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
#>
Here's a sample of my code:
$dbh = DBI->connect("dbi:ODBC:SQL", $user, $passwd) or die
"Connecting : $DBI::errstr\n ";
$dbh->do("use $db") or die $dbh->errstr;
Thanks for any suggestion and/or help!
Matt Bartholomew