in reply to Detecting a failed DBI connection
It looks like you might need to add some error checking to your program. Something like the following will display the error text if the connection fails.
$dbh = DBI->connect("DBI:...", $user, $passwd) or print "<p>Error connecting to database: " . $dbh->errstr . "</p +>", exit;
Look around the monastery for DBI tutorials. I've seen a few but don't have any bookmarks handy.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Detecting a failed DBI connection
by Massyn (Hermit) on Dec 08, 2002 at 23:03 UTC | |
Re: Re: Detecting a failed DBI connection
by chromatic (Archbishop) on Dec 09, 2002 at 00:08 UTC | |
by pfaut (Priest) on Dec 09, 2002 at 00:10 UTC | |
Re: Re: Detecting a failed DBI connection
by mt2k (Hermit) on Dec 09, 2002 at 03:32 UTC | |
by pfaut (Priest) on Dec 09, 2002 at 03:46 UTC |
In Section
Seekers of Perl Wisdom