in reply to Sybperl - Problem with Handling Transactions with Commit and Rollback

VSarkiss is correct. Although I would switch to DBI (with RaiseError set), here's an approach:

eval { $dbh->nsql( "begin transaction" ); $dbh->nsql( <update query 1> ); die "problem with query 1" if $status == 0; . . $dbh->nsql( <update qurey n> ); die "problem with query n" if $status == 0; }; if( $@ ) { $dbh->nsql( "rollback" ); } else { $dbh->nsql( "commit" ); }

-derby

  • Comment on Re: Sybperl - Problem with Handling Transactions with Commit and Rollback
  • Download Code