http://www.perlmonks.org?node_id=188277


in reply to Re: DBI HandleError statement display
in thread DBI HandleError statement display

Thanks for your reply, Tommy!

I tried "$dbh->{ShowErrorStatement} =1" as well as "$inssth->{ShowErrorStaement = 1" without any visible change in the error message.

The statement handles are indeed varying so I cannot use "$sth->Statement".

Some improvement though gives:
$dbh->{HandleError} = sub { warn $DBI::lasth->{Statement}; Carp::confess; }
Now the error messages looks like:
insert into mytable values ( ?, ? ) main::__ANON__('DBD::Oracle::st execute failed: ORA-01722: ...
I found a message from Tim Bunce in perl.dbi.dev that he is planning an extension for showing the bound parameters as well. That means for the moment I'm stuck unless I give up the placeholders.