<!-- Presentation generated by Internet Assistant for Microsoft PowerPoint 97 -->
<HTML>
<HEAD>
<meta name="GENERATOR" content="Microsoft Internet Assistant for Microsoft PowerPoint 97">
<TITLE>Bulk Operations</TITLE>
</HEAD>
<BODY >
<CENTER>
<TABLE WIDTH=100%>
<TR> <TD WIDTH=100% ALIGN=CENTER>
<A HREF="sld001.htm">First</A>
<A HREF="sld076.htm">Previous</A>
<A HREF="sld078.htm">Next</A>
<A HREF="sld102.htm">Last</A>
<A HREF="index.htm">Index</A>
<A HREF="dbi.perl.org">Home</A>
<A HREF="tsld077.htm">Text</A>
</TD> </TR>
<TR> <TD WIDTH=100% ALIGN=CENTER>
<IMG SRC="img077.gif" usemap="#Objmap" WIDTH=800 HEIGHT=600 BORDER=0>
</TD> </TR>
</TABLE>
<P>Slide 77 of 102</P>
</CENTER>
<!-- <UL>
<H2>Bulk Operations</H2>
</UL></P>
<P><UL>
<LI><H2>Execute a statement for multiple values
</H2>
<UL>
$sth = $dbh->prepare("insert into table (foo,bar) values (?,?)");
<BR><BR>$tuples = $sth->execute_array(\%attr, \@list_of_param_array_refs);
<UL>
<LI>returns count of executions, even ones that failed, and not rows-affected
<LI>
</UL></UL></UL><UL>
<LI><H2>Explicit array binding
</H2>
<UL>
$dbh->bind_param_array(1, \@array_of_foo_values, \%attr);
<BR><BR>$dbh->bind_param_array(2, \@array_of_bar_values, \%attr);
<BR>$sth->execute_array(\%attr) # uses bind_param_array values
<UL>
<LI>
</UL></UL></UL><UL>
<LI><H2>Attributes for row-wise binding and per-tuple status:
</H2>
<UL>
ArrayTupleFetch => $code_ref_or_sth row-wise binding
<BR><BR>ArrayTupleStatus => $array_ref return rows-affected and errors
<UL>
<LI>
</UL></UL></UL><UL>
<LI><H2>DBI provides default methods that work for all drivers
</H2>
<UL>
<LI>Some drivers support use of specific database API for very high performance
</UL></UL><UL>
<H2>_</H2>
</UL></P>
<P> -->
</Body>
</HTML>