Closed GoogleCodeExporter closed 8 years ago
executemany is not intended for use with SELECT statements. See PEP249:
http://www.python.org/dev/peps/pep-0249/
Quoting from the specification of the executemany method:
"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."
To amend your example, a correct way to perform this operation would be to use:
c.execute("select * from DiagnosticCodesEN where CODE IN (?,?)", ["A62", "E53"])
Original comment by lukedell...@gmail.com
on 14 Jan 2011 at 5:26
thanks for the info. you learn something new every day :-)
maybe consider adding a comment to the wiki to point this out.
thanks
ben
Original comment by drben...@gmail.com
on 14 Jan 2011 at 2:28
Original comment by mkleehammer
on 6 Feb 2011 at 7:41
Original issue reported on code.google.com by
drben...@gmail.com
on 11 Jan 2011 at 4:26