Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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

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


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


Comment on Re^4: connecting Perl with MS SQL Server on NT using ODBC
Download Code
Re^5: connecting Perl with MS SQL Server on NT using ODBC
by poj (Priest) 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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (15)
As of 2015-07-01 20:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (19 votes), past polls