On Thu, Sep 28, 2006 at 12:16:54PM -0400, Paul Winkler wrote: > On Thu, Sep 28, 2006 at 06:11:01PM +0200, Charlie Clark wrote: > > Am 28.09.2006, 17:30 Uhr, schrieb Paul Winkler <[EMAIL PROTECTED]>: > > > > >>conn.callproc(procedure_name, params) > > >>while True: > > >> rset = conn.fetchone() > > >No dice, it barfs on that line: > > >Traceback (most recent call last): > > > File "<stdin>", line 2, in ? > > >AttributeError: DatabaseConnection instance has no attribute 'fetchone' > > >And, as I pointed out in my original post, DatabaseConnection.callproc() > > >has a different API from cursor.callproc(). Per my experimentation, > > >cursor.callproc() gets (but does not return) all result sets, which can > > >then be accessed via cursor.fetchone(), cursor.nextset() etc. > > >But DatabaseConnection.callproc() simply returns either the first or > > >last result set, depending on your configuration. All other result sets > > >are discarded. > > >Thanks for the help though. Any other suggestions? > > > > Ah, okay. > > > > You can get a cursor on the connection of the connection object: > > c = conn.connection.cursor() > > c.execute("whatever") > > c.fetchone() > > > > Does that work for you? > > Yes! Thank you very much. > > Somehow I failed to notice that the connection had a connection > attribute.
BTW, I think long-term it would be nice if mxODBCZopeDA grew a configuration option like "Fetch all result sets?" but I'm not sure how that would fit with zope's Results class. -- Paul Winkler http://www.slinkp.com _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db