Aargh. Well you're right panix. The irritating bit is that I tried doing this before, and that I've used ora_types to bind to CLOB fields without any problem.

What I've found then is that the "same" error arises under two circumstances: 1) if I use ora_types instead of ora_type with BLOB fields; and 2) if I use our in-house DBI wrapper module with BLOBs. The persistence of the error when testing under the latter is the reason why I wrote off the ora_type business as a non-factor here. All of which makes for a gut-wrenching lesson in the importance of a rigorous breakdown of possible causal relations over the span of multiple tests and even theories.

Anyway, thank you for your work panix++

Update:I believe I've narrowed the problem down to the method DBD::_::do defined in DBI.pm, which our DBI wrapper module relies upon in most cases:

sub do { my($dbh, $statement, $attr, @params) = @_; my $sth = $dbh->prepare($statement, $attr) or return undef; $sth->execute(@params) or return undef; my $rows = $sth->rows; ($rows == 0) ? "0E0" : $rows; }
And this is line 3383 DBI.pm
If any arguments are given, then C<execute> will effectively call L</bind_param> for each value before executing the statement. Values bound in this way are usually treated as C<SQL_VARCHAR> types unless the driver can determine the correct type (which is rare), or unless C<bind_param> (or C<bind_param_inout>) has already been used to specify the type.
Between the code and this comment, and the fact that I can insert, update, etc., values in CLOB fields using do but must call bind_param explicitly when working with BLOB fields leads me to believe that execute is ignoring the attributes bound in prepare and is successfully able to ascertain on its own the type of the CLOB data but not BLOB data. But now I'm wondering why that method takes attributes at all if they aren't going to be used.


In reply to Re: Re: BLOBs and error ORA-01465 by djantzen
in thread BLOBs and error ORA-01465 by djantzen

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.