Help for this page

Select Code to Download


  1. or download this
    my $dbh = DBI->connect("dbi:DriverName:db_name", $user, $password, {
        RaiseError => 1, AutoCommit => 0
    });
    
  2. or download this
    Type: boolean, inherited
    
    The RaiseError attribute can be used to force errors to raise exceptio
    +ns rather than simply return error codes in the normal way. It is "of
    +f" by default. When set "on", any method which results in an error wi
    +ll cause the DBI to effectively do a die("$class $method failed: $DBI
    +::errstr"), where $class is the driver class and $method is the name 
    +of the method that failed. E.g.,
    
    DBD::Oracle::db prepare failed: ... error text here ...