[Zope-DB] opening and closing a database connection from a dtml-method
Matthew T. Kromer
matt@zope.com
Thu, 20 Sep 2001 11:11:42 -0400
Thomas_Janke@prisma-edv.de wrote:
>
>
>-----------
>This is actually a lot trickier than you might think with Zope. The
>reason is that Zope's RDBMS support does not have an "administrativly
>closed" state on connections -- each time a connection is needed, it
>will be opened if it is not already open. So, if you acquire a
>connection object (e.g. by name) and replace its connection string with
>an invalid one, you'll "close" the connection -- but that's not really
>what you want, I dont think.
>----------
>
>How exactly do I replace a connections connection string?
>
>Yours
>
Well, it COULD be as simple as grabbing the connection object and
changing its connection_string attribute, but that is going to vary by
DA as to what it's called -- i.e. there is no API for doing this.
>