sub ExecuteQuery { my ($SQL) = @_; my $sth = $dbh->prepare($SQL) or die $dbh->errstr; $sth->execute() or die $dbh->errstr; # $dbh->commit or die $dbh->errstr; # my $sth = $dbh->prepare($SQL) || ErrorMessage($SQL); # $sth->execute() || ErrorMessage($SQL); return $sth; $session->flush(); }