I've started playing somewhat seriously with the SQL expression subset 
of SA as a replacement for some direct SQL code (and as a possible first 
step to heavier use of SA).  As part of this, I took a query containing 
several selects, which naturally returns several result sets.  In my 
current code (using pyodbc), I use cursor.nextset to collect all the 
results.  (I'm collecting several lists that will be used to populate 
combo boxes in the front end.  I could use several queries, but I 
thought "why make multiple trips to the DB?")

I tried this with SA, using text(), putting the result object into a 
variable.  I was able to fetchall() to get the first set, but the object 
lacks a "nextset".  Fooling around, I found that I could do 
"result.cursor.cursor.nextset()", but attempting to fetchall dies; 
apparently, the underlying cursor has been closed.

I have no specific request at this point, except to suggest an extension 
to ResultProxy to handle this part of the DBAPI cursor API as well. For 
my purposes, I'll either live with multiple SA execute's or just drop 
down to pyodbc for this.

Thanks for listening,
-- 
Don Dwiggins
Advanced Publishing Technology


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to