in reply to Help with DBD::Oracle Blobs

are you asking which comes first? The bind_param or the execute?

if you want to bind multiple parameters, just execute multiple bind_param statements with the first param the incremental parameter number.

$sth->bind_param(1, $value, ... ); $sth->bind_param( 2, $value, ... );


If that's the case, the bind_param will come after the prepare and before the execute. If it's not, please elucidate :-D

Update:
I see what you're trying...

my $sql = "INSERT INTO sometable (x, y, z, blobby) VALUES (?, ?, ?, ?) +" my $sth = $dbh->prepare( $sql ); $sth->bind_param( 1, $x ); $sth->bind_param( 2, $y ); $sth->bind_param( 3, $z ); $sth->bind_param( 4, $lob_value, { ora_type => ORA_BLOB }); $sth->execute();
--------------
It's sad that a family can be torn apart by such a such a simple thing as a pack of wild dogs

Replies are listed 'Best First'.
Re^2: Help with DBD::Oracle Blobs
by merlyn (Sage) on Mar 04, 2005 at 21:38 UTC
    I'm trying to see if I can avoid doing all those bind_params. The actual list is 10 elements. Seems crazy to have to spell all those out just to have one odd bind_param type.

    -- Randal L. Schwartz, Perl hacker
    Be sure to read my standard disclaimer if this is a reply.

      It seems to work that way... ever tried a for-next loop to bind them ;-)
      I know... this was for the fun...
      But serious, in ALL the examples i've seen, you'd have to do it like this.
      Perhaps a time to creat your own module / update the current?