Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Greetings Monks,

We recently upgraded DBD::Oracle to 1.16 (from 1.12) and since then it seems that $DBI::errstr is never set. This happens on any error such as a prepare, execute, or connection error. Has anyone heard of a bug with this specific version? I saw nothing in the version change log. I didn't personally do the upgrade, but I didn't read that there are special switches needed during installation to turn this on. We're running perl 5.6.2, DBI 1.35, and Oracle 10g in a pool of linux servers.

Code like this no longer produces the expected results saying that the column is invalid:

my $dbh = DBI->connect( "dbi:Oracle:$database", $user, $passwd, {AutoC +ommit => 0, RaiseError => 1, PrintError => 0}) || die "Can't connect +to database: $DBI::errstr"; my $qry = $dbh->prepare(q{ select BAD__column from users where id=1254 +3256 }) or die "Prepare bad: $DBI::errstr"; ------OUTPUT------ Use of uninitialized value in concatenation (.) or string at ./dbitest line 15. Prepare bad: at ./ line 15. ------END--------

I see lots of indicators that $DBI::errstr is undef, mainly the -w switch output about using an uninit'd value. I've also seen errstr=undef when I turn DBI->trace on. Has anyone heard of this issue or know of a work-around? I've tried every trapping mechanism I know of, but none work indicating that it must be a lower-level issue with our DBD::Oracle upgrade (and because it works fine on other machines that were left on DBD 1.12).

Thanks! -Darin

In reply to $DBI::errstr is always undef by spivey3587

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the monastery is silent...

    How do I use this? | Other CB clients
    Other Users?
    Others about the Monastery: (4)
    As of 2018-04-21 00:04 GMT
    Find Nodes?
      Voting Booth?