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:
And this is line 3383 DBI.pmsub 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; }
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.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.
In reply to Re: Re: BLOBs and error ORA-01465
by djantzen
in thread BLOBs and error ORA-01465
by djantzen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |