Menu

#33 multiple result sets

0.39
open
nobody
None
5
2010-08-20
2010-08-20
Nigel Heron
No

the behavior seems to have changed for queries with multiple result sets

under 0.37:
>>> sql = "select 1\nselect 2\n"
>>> cur.execute(sql)
>>> cur.fetchall()
[(1,)]
>>> cur.nextset()
1
>>> cur.fetchall()
[(2,)]

under 0.39, multiple queries are grouped:
>>> sql = "select 1\nselect 2\n"
>>> cur.execute(sql)
>>> cur.fetchall()
[(1,), (2,)]

any way to get the 0.37 behavior back?
the example above is trivial, but it makes a difference when querying stored procs that really do return multiple result sets (eg. "sp_helpdb mydatabase")

Discussion


Log in to post a comment.