Re: bulk binds with OCI

[email protected] (Tim Bunce) Thu, 27 Mar 2003 09:55:59 +0000
Newsgroups perl.dbi.oracle-oci
Message-ID <[email protected]>
On Wed, Mar 26, 2003 at 03:44:17PM -0700, John Lien wrote:
> 
> Hi.
> I've been using DBD::Oracle and DBI for a few years, but just discovered the
> Oracle OCI module the other day.  Since then I've been poking around trying
> to learn more about it.
> My goal is to do bulk inserts from Perl.  (I dont believe you can do that
> from DBD::Oracle - let me know if I'm wrong.  I have seen references in my
> search results made to bind_param_array, but could never follow a thread to
> an example.)
> So, can I do bulk inserts with Oracle::OCI?

In theory, but it wouldn't be fun!

DBD::Oracle, via execute_array(), would be easier to patch.
I may even get to it soonish, as hinted by this entry in the change
log for the next DBI release:

  Added on-demand by-row data feed into execute_array() using code ref,
    or statement handle. For example, to insert from a select:
    $insert_sth->execute_array( { ArrayTupleFetch => $select_sth, ... } )

Tim.