Database Query Contains Old Data

Jerry Hill malaclypse2 at gmail.com
Wed May 21 08:49:56 EDT 2008


On Wed, May 21, 2008 at 6:30 AM,  <giraffeboy at gmail.com> wrote:
> The first time you run a report, everything works as expected but if
> you run it a second time, after modifying data, it seems that the data
> from before the modification is selected on the second report run.

Did you remember to commit your changes before re-running the report?
Python's DB API requires that any auto-commit feature of the
underlying database be turned off by default, so you are required to
commit changes yourself.  If you're used to having auto-commit turned
on, this can be confusing.

See http://www.python.org/dev/peps/pep-0249/ for more details of
python's DB API.

-- 
Jerry



More information about the Python-list mailing list