The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

<HTML>

<HEAD>

<meta name="GENERATOR" content="Microsoft Internet Assistant for PowerPoint 97">
 <TITLE>Transactions - Example code</TITLE> 
</HEAD>

<BODY     >

 <H1>Transactions - Example code</H1> 
 <P><UL>
$dbh-&#062{RaiseError} = 1;
<BR>$dbh-&#062begin_work;      # AutoCommit off till commit/rollback
<BR>eval {
<BR>    $dbh-&#062method(…);   # assorted DBI calls
<BR>    foo(...);          # application code
<BR>    $dbh-&#062commit;      # commit the changes
<BR>};
<BR>if ($@) {
<BR>    warn "Transaction aborted because $@";
<BR>    $dbh-&#062rollback;
<BR>    ...
<BR>}
</UL>
<BR>
<BR>.</P>
<P></P> 
<P>
<TABLE>
  <TD HEIGHT=100 WIDTH=100> <A HREF="tsld053.htm">Previous slide</A> </TD>
  <TD HEIGHT=100 WIDTH=100> <A HREF="tsld055.htm">Next slide</A> </TD>
  <TD HEIGHT=100 WIDTH=150> <A HREF="tsld001.htm">Back to first slide</A> </TD>
  <TD HEIGHT=100 WIDTH=150> <A HREF="sld054.htm">View graphic version</A> </TD>
</TABLE>
<BR>
</P>



</Body>
</HTML>