Getting a Mysqldb.Connection objetct form ZMySAQLDA
Hi, 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 ? Thanks in advance for your help --Gilles
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
participants (2)
-
Dieter Maurer -
Gilles Lenfant