in reply to Re^2: DBI Problem
in thread DBI Problem

Putting the flush after the return is less than useless

i suspect the flush belongs in OpenSession

It seems to be a problem in the destructor, when the database has already been closed but the session has not been flushed

Replies are listed 'Best First'.
Re^4: DBI Problem
by tultalk (Monk) on Sep 30, 2017 at 00:19 UTC

    That flush is before the next call to execute. That was the way it was in the examples at the links.

    Why is it useless? It still flushes the session.

        Yes I read it. Just tried it both ways as shown in code and corrected in text.

        Wit the flush before return, the fact that $session->flush() throws an error:

        Software error:

        Can't call method "flush" without a package or object reference at /home/jalamior/www/httpsdocs/cgi-bin/lib/perl/manageusers.pm line 198. localizes the problem to the executequery.

      Have you read return? Everything after a call to return is useless

      Guess it does not. When I moved it ahead of return, pops up error

      Can't call method "flush" without a package or object reference at /home/jalamior/www/httpsdocs/cgi-bin/lib/perl/manageusers.pm line 198.

        where in ExecuteQuery is session given a value? I think this also shows you have not included use strict; use warnings; in your code either, tisk tisk !!