Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: connecting Perl with MS SQL Server on NT using ODBC

by Secalles (Initiate)
on Dec 29, 2011 at 16:30 UTC ( #945527=note: print w/ replies, xml ) Need Help??


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

Hellow monks

i'm getting a similar problem with SQL Server ( I'm on windows )

use DBI; my $user = "rodrigo"; my $pass = "123456"; my $server = "localhost\\WHATSUP:3477"; my $database_name = "equip"; my $DSN = "driver={SQL Server};server=$server;database=$database_name; +uid=$user;pwd=$pass"; my $DBH = DBI->connect("DBI:ODBC:$DSN") or die "Couldn't open database +: $DBI::errstr\n";
But i'm getting the following error:
DBI connect('driver={SQL Server};server=localhost\WHATSUP:3477;databas +e=equip;uid=rodrigo;pwd=123456','',...) failed: [Microsoft][ODBC SQL +Server Driver][DBNETLIB]Invalid connection. (SQL-08001) [st ate was 08001 now 01000] [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (ParseConn +ectParams()). (SQL-01000) at C :\fsecali\connectDB.pl line 9 Couldn't open database: [Microsoft][ODBC SQL Server Driver][DBNETLIB]I +nvalid connection. (SQL-08001) [state was 08001 now 01000] [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (ParseConn +ectParams()). (SQL-01000)
I have no idea what should i do. Thanks in advanced


Comment on Re^2: connecting Perl with MS SQL Server on NT using ODBC
Select or Download Code
Re^3: connecting Perl with MS SQL Server on NT using ODBC
by poj (Priest) on Dec 29, 2011 at 17:12 UTC
    try
    my $server = "localhost\\WHATSUP;tcpip=3477";
    poj
      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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://945527]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2014-12-28 03:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (178 votes), past polls