MySQL Forums
Forum List  »  Connector/Python

Re: refresh connection using MySQLdb
Posted by: Andy Dustman
Date: February 28, 2007 05:02PM

Two problems here:

1) You don't need to do
while curs.nextset() != None
. Just do
while curs.nextset()
. Additionally, calling a stored procedure returns n+1 result sets: The stored procedure itself returns n, while calling it returns one more. Looping like that is probably not a good idea, unless the procedure is returning a variable number of result sets.

2) As has been pointed out, you are in a transactional environment (REPEATABLE READ). To "refresh", do a
if you made changes to be saved.

Options: ReplyQuote

Written By
January 08, 2007 05:51PM
Re: refresh connection using MySQLdb
February 28, 2007 05:02PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.