Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Open and Close a database connection in a request

Date: Wed, 19 Sep 2012 17:46:28 -0700 (PDT)
From: Francois Dion <francois.d...@gmail.com>
To: webpy@googlegroups.com
Message-Id: <9a06eef0-3b13-49ea-b8f4-cf605aeb5063@googlegroups.com>
In-Reply-To: <6410cea1-0ca8-4b5f-9886-54d1dbee67e9@googlegroups.com>
References: <6410cea1-0ca8-4b5f-9886-54d1dbee67e9@googlegroups.com>
Subject: Re: Open and Close a database connection in a request
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_341_6504566.1348101988967"

------=_Part_341_6504566.1348101988967
Content-Type: multipart/alternative; 
	boundary="----=_Part_342_1915275.1348101988967"

------=_Part_342_1915275.1348101988967
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable



On Wednesday, September 19, 2012 3:54:12 PM UTC-4, ProfessionalIT wrote:
>
> How to implement this ?
>
> When I init the request I need open a connection with the database (and=
=20
> execute a query for example) and in the end of the request I need close t=
he=20
> database connection.=20
>
>
Por que fechar a conex=C3=A3o?

Normally, for performance, you want to open the connection as soon as you=
=20
get a chance and _keep_ it open. What problem are you trying to solve?

Tchau,
Francois

--
Francois Dion
http://solarisdesktop.blogspot.com

------=_Part_342_1915275.1348101988967
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<br><br>On Wednesday, September 19, 2012 3:54:12 PM UTC-4, ProfessionalIT w=
rote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8e=
x;border-left: 1px #ccc solid;padding-left: 1ex;">How to implement this ?<d=
iv><br></div><div>When I init the request I need open a connection with the=
 database (and execute a query for example) and in the end of the request I=
 need close the database connection.&nbsp;</div><div><br></div></blockquote=
><div><br>Por que fechar a <span class=3D"st">conex=C3=A3o?<br>
  <br>
Normally, for performance, you want to open the connection as soon as you g=
et a chance and _keep_ it open. What problem are you trying to solve?<br><b=
r>Tchau,<br>Francois<br><br>--<br>Francois Dion<br>http://solarisdesktop.bl=
ogspot.com<br></span></div>
------=_Part_342_1915275.1348101988967--

------=_Part_341_6504566.1348101988967--