Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Connection to DataBase

by Anonymous Monk
on Sep 15, 2010 at 15:49 UTC ( [id://860241]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        
        my $userid   = q{};
        my $password = q{};    
        my $strCnn = "Provider=SQLOLEDB; Data Source=$Servername; Initial 
    +Catalog=$Tablename; Integrated Security=SSPI;";
        $dbh = DBI->connect( "dbi:ADO:$strCnn", $userid, $password, { Rais
    +eError => 1, AutoCommit => 0 } ) or 
            croak "Cannot connect: $DBI::errstr";
    
  2. or download this
        my $data_source = qq/dbi:ODBC:driver={SQL Server};Server=$Serverna
    +me;database=$DataBaseName;Regional=No;/;
        my $user = q//;
        my $password = q//;
        $dbh = DBI->connect($data_source, $user, $password)
                  or die "Can't connect to $data_source: $DBI::errstr";
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-26 00:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found