On 9 jun, 17:38, Jose <jjac...@gmail.com> wrote: > As I mentioned, with the object caching works well. > When I create the object you pass as argument the db. The problem I > have is that when I save something in the database fails me because > the base is closed. > > ... > File "/usr/home/jose/web2py/applications/py_ccu/modules/ > incidencias.py", line 124, in migrar_archivo > self._db(qry_localidad).delete() > File "/usr/home/jose/web2py/gluon/sql.py", line 3263, in delete > self._db._execute(query) > File "/usr/home/jose/web2py/gluon/sql.py", line 899, in <lambda> > self._execute = lambda *a, **b: self._cursor.execute(*a, **b) > ProgrammingError: Cannot operate on a closed database. > > Not because it closes, as in the __init__ run multiple queries and I > have no problems. > > It reminds me error when I use the web shell. Will be about the same? > > Jose
The why is closed, is about creating a new db instance for each request. If so, should discard what I do? Jose