Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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??

Help for this page

Select Code to Download


  1. or download this
    use DBI;
    
    ...
    
    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";
    
  2. or download this
    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]
    ...
    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)
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://945527]
help
Chatterbox?
[Tanktalus]: Does anyone have a link to somewhere that explains why it's a bad idea to spit out text on stdout/stderr in the login scripts when it's a non-interactive shell?

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2017-04-25 21:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (464 votes). Check out past polls.