The Magnet wrote:
> Hi,
>
> I cannot seem to get Oracle to return any status codes to Perl I have
> the following line:
>
> $dbh->do("BEGIN load_story_prc('$name','$formattedtime'); END;");
> if ($@) { warn "Database error on $name: $DBI::errstr\n"; }
>
> But I never get anything back. Ideally I'd like to get the ORA- error
> message if there is any.....
>
> Can anyone help?
If you are activating RaiseError, then the $dbh->do needs to be put in
an eval{...}, oherwise it won't survive to reach test $@. And if you
are not setting RaiseError and using eval{}, then there is no reason
for $@ to ever get set, whether there is an error or not.
Xho
|