in reply to Re^2: Toggling dbi attribute within a connection?
in thread Toggling dbi attribute within a connection?

This prints "1 error 3" for me with PostgreSQL, as I'd expect. I don't have ODBC handy to check.
#!perl -w $|=1; use strict; use DBI; my $dbh=DBI->connect('dbi:Pg:dbname=test1'); $dbh->{PrintError}=0; $dbh->do('junk'); print "1"; eval { local $dbh->{RaiseError}=1; $dbh->do('junk'); print "2"; }; print " error " if $@; $dbh->do('junk'); print "3";

Replies are listed 'Best First'.
Re^4: Toggling dbi attribute within a connection?
by JupiterCrash (Monk) on May 12, 2005 at 16:17 UTC
    Your sample code works for me as well (on ODBC).

    So something is obviously awry with my code.

    Hmm! More to come... :)
    (and thanks again)

    Matt
      It's possible that DBD::ODBC doesn't (or can't?) override all ODBC errors i.e. that some errors are considered "always fatal". I suggest writing to the dbi-users@perl.org list.