May be "dynamically database connection" means that we use the same "Z
SQL Method" with different database connections (in the same Zope
Instance, of course). So we can change "dynamically" from one database
to another (schema-equal).
In other words, is it possible to define "database connecti
you can do it like this:
db = DCOracle2.connection(connectionString)
C1 = db.cursor()
C2 = db.cursor()
sql = "sp1(INparam1, :INparam2, :INparam3, :INparam4, :ref_cur)"
C1.execute(sql, (INparam1, INparam2,INparam3,INparam4, C2))
for row in C2:
...
Maan M. Hamze a écrit :
I am using DCOCralce2
options = "(2714, " + "'" + "" + "'," + "36, 1, c2)"
it's wrong!
you must give a sequence as second parameter of execute method.
So you do like this:
options = (2714, '',36, 1, c2)
c1.execute(sql, options)
Maan M. Hamze a écrit :
> Hello -
> Thanks for your help. I am still ge
solution from zope-db archives was pointed to me by Maciej Wisniowski :
http://www.nabble.com/Re:-RE-:-How-lunch-SQL-request-from-python-script---t3039608.html
and here is the final implementation:
1-add a Z cxOracle Database Connection (myconnection) via pmi
2-add a python script for external