| Issue 45: | hard crash when passing a list of sets to executemany | |
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem?
<code>
import pyodbc
print pyodbc.version
SERVER, DATABASE = "SVR17", "TDI"
DSN = "Driver={SQL Server};Server=%s;Database=%s;TrustedConnection=Yes" %
(SERVER, DATABASE)
db = pyodbc.connect (DSN)
q = db.cursor ()
q.execute ("CREATE TABLE #words (word VARCHAR (100))")
q.close ()
words = set (['a'])
q = db.cursor ()
q.executemany ("INSERT INTO #words (word) VALUES (?)", [words])
q.close ()
</code>
What is the expected output? What do you see instead?
Expected an error message (as you get if you use q.execute
rather than q.executemany). Instead, crashed hard.
What version of the product are you using? On what operating system?
2.1.3 from on Python 2.6.1
Apr 19, 2009
Project Member
#1
mkleehammer
Status:
Verified
Nov 21, 2010
(No comment was entered for this change.)
Status:
Complete
|