Re: [Zope] Getting a Mysqldb.Connection objetct form ZMySAQLDA
by Dieter Maurer other posts by this author
Dec 18 2002 10:13PM messages near this date
[Zope] Getting a Mysqldb.Connection objetct form ZMySAQLDA
|
Re: [Zope] Getting a Mysqldb.Connection objetct form ZMySAQLDA
Gilles Lenfant writes:
> Is it possible to get a MySQLdb.Connection object from a ZMySQLDA object ?
> I need this because my Python product builds the query string dynamically
> and a ZSQL Method is not suitable for this.
> Or should I parse the connection string and build my own Connection object ?
I use:
conn= getattr(db,'_v_conn',None)
if conn is None: db._v_conn= conn= apply(Connect,(),db.kwargs)
"db" is a ZMySQLDA instance.
Dieter
_______________________________________________
Zope maillist - Zope@[...].org
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
Thread:
Gilles Lenfant
Dieter Maurer
Gilles Lenfant
Martin Gebert
|