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:DRI VER=SQL Server;
DATABASE=DB1;
APP=Microsoft Data Access Components;
Trusted_Connection=No;
SERVER=ABC;',"$DBuser","$D Bpw");
-------------------------- ---------- ---------- ---------- ---------- ----------
How can I substitute a variable that contains the db connection string?
--------------------------
my $dbh = DBI->connect('dbi:ODBC:DRI
DATABASE=DB1;
APP=Microsoft Data Access Components;
Trusted_Connection=No;
SERVER=ABC;',"$DBuser","$D
--------------------------
How can I substitute a variable that contains the db connection string?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER