| Issue 150: | cursor.executemany() weirdness in v 2.1.8 | |
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem?
1. cursor.executemany with a SELECT statement returns only the final SELECT from the params list
What is the expected output? What do you see instead?
>>> c.executemany("select * from DiagnosticCodesEN where CODE=?",[("A62",), ("E53",)])
>>> c.fetchall()
[(u'E53', None, u'Severe pulmonary hypertension')]
ie. i should get:
>>> [(u'A62', None, u'Normal mitral valve morphology and function'),(u'E53', None, u'Severe pulmonary hypertension')]
What version of the product are you using? On what operating system?
'2.1.8'; Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on win32
Please provide any additional information below.
- Thanks for pyodbc!
- It would real nice if you could pass a simpler params list. right now if i pass ['A62','E53'] it raises a TypeError, instead i have to generate a list of tuples as above [("A62",), ("E53",)])
Jan 13, 2011
#1
lukedell...@gmail.com
Jan 14, 2011
thanks for the info. you learn something new every day :-) maybe consider adding a comment to the wiki to point this out. thanks ben
Feb 6, 2011
(No comment was entered for this change.)
Status:
NoFix
|