MySQL Forums
Forum List  »  Connector/Python

Re: Python Multiline
Posted by: Tobin Cataldo
Date: July 19, 2007 01:26PM

Either execute the commands one at a time via a loop or try to use the alternative executemany method as defined in the DB API 2.0 spec (


Prepare a database operation (query or command) and then
execute it against all parameter sequences or mappings
found in the sequence seq_of_parameters.

Modules are free to implement this method using multiple
calls to the execute() method or by using array operations
to have the database process the sequence as a whole in
one call.

Use of this method for an operation which produces one or
more result sets constitutes undefined behavior, and the
implementation is permitted (but not required) to raise
an exception when it detects that a result set has been
created by an invocation of the operation.

The same comments as for execute() also apply accordingly
to this method.

Return values are not defined.

Options: ReplyQuote

Written By
July 16, 2007 07:45PM
Re: Python Multiline
July 19, 2007 01:26PM
August 07, 2007 04:18AM

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.