in reply to DB Connectivity issue
I'm wondering if this is because you're using the same DB handle to open the second connection before closing the previous one.
With use warnings;, you would have received a warning similar to:
"my" variable $dbh masks earlier declaration in same scope...
Because you've declared it twice with my.
Try either disconnecting then reusing the same $dbh:
my $dbh = ...; print "This works\n"; $dbh->disconnect; ... $dbh = DBI->connect ... # no my declaration
...or just using a different handle name:
my $dbh_1 = ... ... my $dbh_2 = ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: DB Connectivity issue
by schluckie (Initiate) on Jun 01, 2016 at 05:10 UTC |