Hello,

I'm a newbie here and have a question regarding the use of
DBI::ODBC with SQL Server.  I've checked the mail archives
and seen others with the same problem but have yet to
come across the solution.

Here's what I'm doing: (note: actual user name and password have been
changed here).

use DBI;
my %attr = (
    PrintError => 1,
    RaiseError => 1
    );

$dbh = DBI->connect("dbi:ODBC:LocalServer", "user", "password". \%attr)
    or die "Can't connect to DataBase: ", $DBI::errstr, "\n";

...

Here's the error:

DBI->connect(LocalServer) failed: [Microsoft][ODBC SQL Server Driver][SQL
Server]Login failed for user 'user'. (SQL-28000)(DBD: db_login/SQLConnect
err=-1)
Can't connect to DataBase: [Microsoft][ODBC SQL Server Driver][SQL
Server]Login failed for user 'user'. (SQL-28000)(DBD: db_login/SQLConnect
err=-1)


I've done the following:

1) Verified that a valid DSN exists for LocalServer.
2) Verified that user and password are configured properly in the DSN.
3) Verified that the SQL Server Database is correct.
4) Tested the ODBC Data Source is correct through the ODBC Administrator.

I'm using Win2K and SQL Server 7.

I'm trying to avoid using the WIN32:ODBC but I have used it successfully.

Thoughts, Comments, Dirty Remarks?

Thanks,

Carter.

--
Carter A. Thompson
Lead Release Engineer
Voxeo Corporation
http://www.voxeo.com
(831) 461-4925

Reply via email to