[web2py] Re: How do I explicitly close a database connection?

2011-02-05 Thread Massimo Di Pierro
I assumed he was planning to use db...close() outside web2py in some python script. In the web2py context you should not close the db. Not because you lose auth_user since the connection will be reopened at the next request, but because of speed issues (the connection has to be re- established)

[web2py] Re: How do I explicitly close a database connection?

2011-02-05 Thread mart
makes sense, thanks :) On Feb 5, 11:16 am, Massimo Di Pierro massimo.dipie...@gmail.com wrote: I assumed he was planning to use db...close() outside web2py in some python script. In the web2py context you should not close the db. Not because you lose auth_user since the connection will be

[web2py] Re: How do I explicitly close a database connection?

2011-02-04 Thread Massimo Di Pierro
db._adapter.connection.close() On Feb 4, 10:24 am, vortex billyara...@gmail.com wrote: How do I explicitly close a database connection?

[web2py] Re: How do I explicitly close a database connection?

2011-02-04 Thread mart
I don't get it... doesn't this make you logged out because you wouldn't have auth_user anymore? then what do you do? But on the other hand could we use this to hop from one db to another (thinking through script) ? Sorry for asking ;) Mart On Feb 4, 12:57 pm, Massimo Di Pierro