[Zope-DB] DCOracle2 - Result as dict instead of a tuple

Christian Klinger cklinger at novareto.de
Fri Nov 19 04:09:34 EST 2004


Hello

is it possible to get in this script a dict instead of a tuple?

I know that in python-mysql it is possible!


---------------------------
import DCOracle2
conn = DCOracle2.connect('xxx/xxx at xxx')
cursor = conn.cursor()


def getProps(p):
         sqlstate = "%s" %(p)
         #print "SQLSTATE : %s" %sqlstate
         #sqlstate = "select %s from props" %(p)
         cursor.execute(sqlstate)
         erg = cursor.fetchall()
         return erg

t = getProps(p="select * from swfert.vweb_anrede order by 2")
print t
-----------------------------


thx christian



More information about the Zope-DB mailing list