Fetch DBI 1.22 and study the t/15array.t file
which gives examples of the new
bind_param_array()
and
execute_array()
methods.
(There are no docs yet).
You won't see much speed up yet - but a later DBD::ODBC release
could support those methods directly and then you certainly would!
Tim.
On Fri, May 24, 2002 at 10:51:49AM -0700, Snethen, Jeff wrote:
> I'm using ODBC to connect to a M$ Access DB and I have a case where I'm having to
>insert a large number of rows. My
> subroutine that accomplishes this is:
>
> sub updateCodeProfile
> {
> my ($self, @args) = @_;
>
> $self->{_sth}->{_CodeProfileTbl}->execute( $self->{_dateID}, @args );
> }
>
> where my connect and prepare are done at construction time, so that is out of the
>picture. I simple call
> "updateCodeProfile" with my data about 9000 times to insert each row. What I was
>wondering was if there was something
> like the fetchall_arrayref() except for the execute--executeall_arrayref()--where I
>could just feed it a list and it
> will keep executing that list until it is finished? I don't recall seeing anything
>like that in my book.
>
> Thanks.
> Jeff