You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Jason Bodnar <jb...@buzzard.kdi.com> on 2001/05/22 02:47:09 UTC

RE: Still not talking!

> $db_username = "xxxxxxxx";
> $db_password = "xxxxxxxx";
> warn "Before DBI->connect(): [$$]";
> $dbh = DBI->connect($dsn, $db_username, $db_password, {'RaiseError' => 1})
> or die sprintf "Error: %s.\n", DBI->errstr;

You're probably not getting your error message because you have RaiseError on.

>From the DBI pod:

RaiseError (boolean, inherited)
          This attribute can be used to force errors to raise
          exceptions rather than simply return error codes in
          the normal way. It is "off" by default.  When set
          "on", any method which results in an error will cause
          the DBI to effectively do a die("$class $method
          failed: $DBI::errstr"), where $class is the driver
          class and $method is the name of the method that
          failed. E.g.,

          DBD::Oracle::db prepare failed: ... error text here ...


So DBI is dying before your die ... as to why you can't connect? I'm not sure
yet. Still thinking ...

-- 
Jason Bodnar
jason@shakabuku.org

RE: Still not talking!

Posted by "Jonathan M. Hollin" <ne...@digital-word.com>.
:: You're probably not getting your error message because you have 
:: RaiseError on.

Have corrected that - but the results haven't changed in any way.

Kindest regards,
Jonathan M. Hollin
Digital-Word.com