My favorites | Sign in
Project Home Downloads Wiki
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
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
Status:  Complete
Owner:  ----
Closed:  Apr 2009


 
Reported by tjgolden@gmail.com, Apr 7, 2009
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
Fixed in 345c3c30a5ad318d002deac1cc3329055a1fe1cf, which will be 2.1.5

Status: Verified
Nov 21, 2010
Project Member #2 mkleehammer
(No comment was entered for this change.)
Status: Complete

Powered by Google Project Hosting