Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    
  2. or download this
    sub open_dbi {
        # Declare and initialize variables
    ...
        my $dbh = DBI->connect("dbi:ODBC:database=$db;host=$host", $db_use
    +r, $db_password, {RaiseError => 0, PrintError => 0} ) or err_trap("Ca
    +nnot connect to the database");
        return $dbh;
    }