grinder has asked for the wisdom of the Perl Monks concerning the following question:
I have a big $application that uses Oracle on Windows 2000, and I speak to the database with ActiveState Perl 5.6, since 5.6 is the last version for which Oracle allows AS to package DBD::Oracle. This reason, as much as anything else, precludes me from upgrading to 5.8. I had to upgrade DBI a while ago, because I was running into problems with DBD::Proxy that have been resolved in more recent versions. Everything is now working correctly, except that I am getting the following non-error warnings:
DBD::Oracle::db selectall_arrayref warning: (err=0, errstr=undef, state=undef) at foo.pl line 666.
It's a non-error: it's basically saying "hey! everything's ok! hope you're happy about that!" and it's making my life a misery because my log files are filling up with ten of thousands of these statements. I have tried setting all sorts of incantations in the creation of database handles, such as setting RaiseError and PrintError to zero. I had high hope for the HandleError and HandleSetErr attributes. Poking about in the DBI.dll, it looks like the above err=... errstr=... state... string is belongs to the default HandleSetErr handler. I created a connection thusly:
$db = DBI->connect( $base, $user, $pw, { AutoCommit => 0, PrintError => 0, HandleError => sub { print "error handler <@_>\n"; return 0 } +, HandleSetErr => sub { print "seterr handler <@_>\n"; return 0 +}, }) or croak "Could not connect to database $base: ${\DBI->errstr}\ +n";
... but it appears that my handlers here are not called by anything, and I still get the errstr=undef spew. Is there something wrong with my handlers, or do I need to do something differently, or do something else? Thanks for any clues I can use.
• another intruder with the mooring in the heart of the Perl
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Silencing DBI "(err=0, errstr=undef, state=undef)" errors
by holli (Abbot) on Dec 20, 2005 at 11:06 UTC | |
|
Re: Silencing DBI "(err=0, errstr=undef, state=undef)" errors
by Akhasha (Scribe) on Dec 21, 2005 at 03:00 UTC | |
|
Re: Silencing DBI "(err=0, errstr=undef, state=undef)" errors
by jZed (Prior) on Dec 20, 2005 at 18:32 UTC | |
|
Re: Silencing DBI "(err=0, errstr=undef, state=undef)" errors
by Anonymous Monk on Dec 20, 2005 at 11:58 UTC |