I played with this and could not get it to fail -- I was not sure if a long (length) CHAR would trigger the error. Either it does not, or the fact I am using Oracle 8 is masking it.

Oracle version: 8.1.7.2

Play table used:

CREATE TABLE junk_table ( short_field CHAR(10), long_field CHAR(100), junk_number NUMBER );

Since my queries worked correctly, I am going to make some assumptions (I know, bad *smiles*) and offer some thing which might help.

First off, it looks like you have RaiseError => 1 (True) in your DBI->connect. This is not a bad thing, but causes your program to terminate on the error; the error, I believe, is in your "while (@data = $handle->fetchrow_array())" statement (more specifically, fetchrow_array.) This raises an error because a column being returned exceeds LongReadLen and you have LongTruncOk set to 0 (False). To find out more information on these, I used perldoc DBI. (A lot to read there.)

Anyway, increasing the size of LongReadLen will consume additional memory, but should have the benefit of actually letting your script run. *Grins*

If you would like to post more of your code, I will gladly look at it.

Also, I would like to thank you. I had never read a lot of the "extra" setting for DBI, and now have some new things with which to play -- like ChopBlanks.


In reply to Re: DBI Oracle error LongReadLen too small by Rhose
in thread DBI Oracle error LongReadLen too small by Anonymous Monk

Title:
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, details, 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, summary, 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.