Subject: | Death not reported in event log when DBI->connect fails |
When a DBI connect fails, the script dies without reporting an error. In this particular case, the script was using DBD::ODBC to connect to an access database where the lock file (.ldb) was not writable by the Windows NT user running the script. The error logged in the PerlIS-Err.log file, but not in the Windows NT event log.
Code in question:
my $dbh = DBI->connect("DBI:ODBC:DSN", "user", "password")
or croak "Unable to connect to PCDB";