Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Oracle BLOB Locator

by Dietz (Curate)
on Aug 20, 2005 at 15:31 UTC ( #485389=note: print w/ replies, xml ) Need Help??


in reply to Oracle BLOB Locator

$fil = ${ $hashref->{IMP_IMAGE} }; ######## ERROR OCCURS HERE

You already know where your error lies. What have you tried so far?
I bet your $fil will be uninitialized, therefore you can not bind your locator.
Why? You're trying to dereference a dereferenced hash value as a scalar value.

Try
$fil = $hashref->{IMP_IMAGE};
or
$fil = ${$hashref}{IMP_IMAGE};

Turning on strict would have told you.


Comment on Re: Oracle BLOB Locator
Select or Download Code
Re^2: Oracle BLOB Locator
by Lhamo Latso (Scribe) on Aug 20, 2005 at 17:51 UTC
    The first error listed occurs on the subsequent sth2.bind_param with:
    $fil = $hashref->{IMP_IMAGE};
    and the second error occurs on the sth2.execute with:
    $fil = ${ $hashref->{IMP_IMAGE} };
    I think the second one in more correct, being that I actually could do the bind. The PLS-00306 error occurs on the sth2.execute statement, during the call to dbms_lob.filegetname. The first passed arguement is the lob locator, of which DBD::Oracle provides 2 ora_types: ora_clob and ora_blob. My lob locator is BFILE. I worked later last night and found that the Oracle column IDs CLOB, BLOB and BFILE are 112, 113 and 114. That makes the error message accurate in that I gave the wrong type.

    I tried just passing an integer 114, but the DBD or DBI interface complained and replaced it with SQLVARCHAR.

    I just checked the code. I had "use strict;" on.

    Thanks for the help.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://485389]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2014-12-28 12:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (181 votes), past polls