in reply to Re^3: connecting Perl with MS SQL Server on NT using ODBC
in thread connecting Perl with MS SQL Server on NT using ODBC

I still get an error
DBI connect('driver={SQL Server};server=localhost\WHATSUP;tcpip=3477;d +atabase=equip;uid=rodrigo;pwd= 123456','',...) failed: [Microsoft][ODBC SQL Server Driver][DBNETLIB]S +QL Server does not exist or access denied. (SQL-08001) [state was 08001 now 01000] [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect() +). (SQL-01000) [state was 0100 0 now 01S00] [Microsoft][ODBC SQL Server Driver]Invalid connection string attribute + (SQL-01S00) at C:\fsecali\con nectDB.pl line 9 Couldn't open database: [Microsoft][ODBC SQL Server Driver][DBNETLIB]S +QL Server does not exist or ac cess denied. (SQL-08001) [state was 08001 now 01000] [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect() +). (SQL-01000) [state was 0100 0 now 01S00] [Microsoft][ODBC SQL Server Driver]Invalid connection string attribute + (SQL-01S00)
Thanks

Replies are listed 'Best First'.
Re^5: connecting Perl with MS SQL Server on NT using ODBC
by poj (Abbot) on Dec 29, 2011 at 17:40 UTC

    Different error

    SQL Server does not exist or access denied.

    I suggest using Control Panel / Administrative Tools / ODBC Data Source Administrator to test your connection parameters

    poj

      I open it and i have no Data Source configured here.

      I configured a SQL Server called MSSQL (in System DSN) and it worked ( the test was successful )and i'm still getting "access denied"

      Should i change my code?

        Yes, it should use that System DSN with this

        my $DBH = DBI->connect("DBI:ODBC:MSSQL",$user,$pass) or die "Couldn't +open database: $DBI::errstr\n";
        poj