I'm calling a stored procedure (not with callproc but the "old" way with cursor.execute("call MyProcedure()")) which produces several results sets.
The number of result sets varies and there can be empty result sets in between.
Since nextset() always seems to return an empty result set as last set, processing of the result sets is quite tricky (delaying the processing of empty sets until a non-empty set is found or finally nextset() returns None).
Is there any way to determine how many results sets there are or that it's (not) the fake last result set before calling nextset() once more?
Thanks,
Tom
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi there,
I'm calling a stored procedure (not with callproc but the "old" way with cursor.execute("call MyProcedure()")) which produces several results sets.
The number of result sets varies and there can be empty result sets in between.
Since nextset() always seems to return an empty result set as last set, processing of the result sets is quite tricky (delaying the processing of empty sets until a non-empty set is found or finally nextset() returns None).
Is there any way to determine how many results sets there are or that it's (not) the fake last result set before calling nextset() once more?
Thanks,
Tom
Nope, not that I'm aware of. But also see:
http://dev.mysql.com/doc/refman/5.0/en/c-api-multiple-queries.html