Am 28.09.2006, 00:26 Uhr, schrieb Paul Winkler <[EMAIL PROTECTED]>:

I'll be writing product code, and am currently just experimenting via
zopectl debug, so I have full access to everything.  But I still can't
see how to get a cursor or anything else that will let me retrieve
multiple record sets from one STP call.
What should I be looking for?
./bin/zopectl debug
Starting debugger (the name "app" is bound to the top-level Zope object)
conn = app.sweetums_test()
<Products.mxODBCZopeDA.ZopeDA.DatabaseConnection "DSN=MSSQLdsn" thread
47227742061040/47227742061040 at 0x2aaaab0907e8>

You don't need an explicit cursor as you already have one for your connection. Simply use callproc()

conn.callproc(procedure_name, params)
while True:
    rset = conn.fetchone()
    print "============================="
    if conn.nextset() is None: break

Zope-DB mailing list

Reply via email to