http://www.perlmonks.org?node_id=945531


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

try
my $server = "localhost\\WHATSUP;tcpip=3477";
poj

Replies are listed 'Best First'.
Re^4: connecting Perl with MS SQL Server on NT using ODBC
by Secalles (Initiate) on Dec 29, 2011 at 17:26 UTC
    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

      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?