Help for this page

Select Code to Download


  1. or download this
    $sth->execute;
    if ($sth->errstr) {
        die "Failed to execute ($stmt) - ", $sth->errstr(), "\n";
    }
    
  2. or download this
    use strict;
    use DBI;
    use DBD::DB2;
    ...
    print "should not get here\n";
    $sth->finish() or die "Cant close sth - $DBI::errstr\n";
    $dbh->disconnect() or die "Cant disconnect from DB - $DBI::errstr\n";
    
  3. or download this
    C:\PerlScripts>test.pl
    the execute should have failed before here
    DBD::DB2::st fetch failed: [IBM][CLI Driver][DB2] SQL0904N  Unsuccessf
    +ul execution caused by an unavailable resource.  Reason code: "00C900
    +81", type of resource
    ...
    should not get here
    
    C:\PerlScripts>