I had some support functions in a controller. They access DAL objects, 
particularly databases. I'm using SQLSERVER.

I moved these functions to a module. To tell my module about the databases, 
I store the databases in the model db.py like so
current.db1 = db1

and then use a global in the module
db1. = current.db1

But now I get
<class 'pyodbc.ProgrammingError'> The cursor's connection has been closed.

when an SQLFORM is trying to be displayed. The trace indicates that the 
error is coming from the new module. 


The utility functions build SQLGRIDs for example. Apart from moving them to 
modules, nothing has changed intentionally.
I suspect something to do with the way the modules are accessing the DAL 
variables. 

This is using git but checked out is R-2.5.1


-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to