I dont know that MySQLdb (the adapter we use) supports multiple result
sets ? you'd have to check its documentation. but in general
SQLAlchemy's API doesnt support multiple result sets in one execution,
you'd have to use a raw cursor.
On May 9, 2009, at 4:17 PM, Rodney Haynie wrote:
>
> Hi everyone.
>
> SQLAlchemy 0.5.3
> TurboGears 2.0
> MySQL
> Windows
>
> I am trying to execute a stored procedure call from my controller
> using:
>
> result = conn.execute("CALL test_2resultsets").fetchall()
>
> However, result will only hold the first result set. I was
> anticipating
> result holding all of the result sets. In this case, the test stored
> procedure is returning 2 separate result sets.
>
> Is there a separate call I have to make to pull the second result set?
>
> I have included the stored procedure code below.
>
> delimiter //
> CREATE PROCEDURE test_2resultsets ()
> BEGIN
>
> SELECT 1 AS my_id, 'Rodney' AS my_name;
>
> SELECT 2 AS her_id, 'Angela' AS her_name;
> END;
> //
> delimiter ;
>
>
> Thanks for any help.
> -Rodney
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---