[Zope-dev] dcoracle problem..

Christian Scholz cs@comlounge.net
Mon, 3 Jul 2000 23:47:55 +0200


Hi!

Maybe someone has had this before and knows a solution:

I am having a stored procedure proc1 and I am calling it twice:

dbc=DCOracle.Connect("secret!")
c=dbc.cursor()
dbc.procedures.my_pkg.proc1(c)
print c.fetchall()
c.close()
dbc.procedures.my_pkg.proc1(c)
print c.fetchall()


In proc1 it looks basically like

OPEN mycursor FOR
SELECT f1,f2,f3
FROM mytable


Thus the cursor get's opened and filled (mycursor is actually a cursor
variable).

The expected result for the above python script is that it's printing two times
the same list of results. Actually it doesn't, the second one is empty.

When creating a new cursor before the second call like

c2=dbc.cursor()
dbc.procedures.my_pkg.proc1(c2)
print c2.fetchall()

I get

Traceback (innermost last):
  File "./testcall.py", line 16, in ?
    print c2.fetchall()
  File "/opt/python/lib/python1.5/site-packages/DCOracle/ociCurs.py", line 397, in fetchall
    v=f(1)
  File "/opt/python/lib/python1.5/site-packages/DCOracle/ociCurs.py", line 375, in fetchone
    raise error, 'not querying'
oci.error: not querying

Thus it seems as if the cursor is not opened..

Has anyone an idea about this.. (I was also looking at the code but it's a little
complex..)

regards,
  Christian