[Zope] Getting a Mysqldb.Connection objetct form ZMySAQLDA

Dieter Maurer dieter@handshake.de
Wed, 18 Dec 2002 23:13:53 +0100


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