Link to home
Start Free TrialLog in
Avatar of kkbenj
kkbenj

asked on

Perl database connection

The following string works correctly, opening a connection to my current SQL server database:
----------------------------------------------------------------------------
my $dbh = DBI->connect('dbi:ODBC:DRIVER=SQL Server;
                                    DATABASE=DB1;
                                    APP=Microsoft Data Access Components;
                                    Trusted_Connection=No;
                                    SERVER=ABC;',"$DBuser","$DBpw");
----------------------------------------------------------------------------
How can I substitute a variable that contains the db connection string?
ASKER CERTIFIED SOLUTION
Avatar of Nem Schlecht
Nem Schlecht
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kkbenj
kkbenj

ASKER

Great.  Thank you!