#------------------------------------------------------------------------------- # Database Conection Functions #------------------------------------------------------------------------------- # FUNCTION: OpenConnection() # DESCRIPTION: Connect to the MySQL database #------------------------------------------------------------------------------- sub OpenConnection { my $localtimenow = localtime(Now()); $dbh = DBI->connect($dsn,$sql_username,$sql_password) or ErrorMessage("Could not connect to the database."); warn("Open Connection-JustBefore returning database handle: '$dbh' Current Time: '$localtimenow'"); return $dbh; }