[DB-SIG] executemany

Michael Guidry michael.guidry@trigenttech.com
Fri, 18 Feb 2000 15:45:26 -0600


I'm new at python but like what I see.
Just starting to devour M. Hammonds new book Programming on Win32 - fairly
good read so far. Running on NT using MS SQL database.
I think I've installed the mxODBC and mxDateTime code correctly and renamed
the original odbc.pyd. I try to cursor.executemany but get AttributeError:
executemany. Here's the codesnip. Any other WIN32 MS SQL folks out there
with some hints. Thanks in advance.

 import ODBC.Windows
 conn = ODBC.Windows.Connect('Music')
 crsr = conn.cursor()
 stmt = "INSERT INTO Country (name1, name2) VALUES (?,?)"
 crsr.executemany(stmt,
 	('Tom','Jones')
 	('George','Smith')
 	]
 	)

Traceback (innermost last):
  File "<interactive input>", line 2, in ?
AttributeError: executemany


Michael Guidry, PMP