On 2006-12-19 01:34, Carsten Haese wrote:
> On Tue, 2006-12-19 at 01:01 +0100, M.-A. Lemburg wrote:
>> On 2006-12-18 22:56, Art Protin wrote:
> 
>>>       While I am bothering you good people with my silly questions, I 
>>> might just as well tack on another:  if one invokes .executemany with a 
>>> seq_of_parameters that is empty (like
>>>
>>> a_cursor.executemany(SQL, [])
>>>
>>> ) shouldn't the interface module execute the query zero times, ie, not 
>>> execute the query at all?
>> The SQL command could be a command that doesn't have any parameters.
>> In such a case, the above would be the same as .execute(SQL).
> 
> I beg to differ. I think it's quite clear from the spec that
> cursor.executemany(SQL, []) is a no-op. To actually execute a
> parameter-less query with executemany, you'd have to pass an empty
> parameter tuple as in cursor.executemany(SQL, [()]).

You're right. Shouldn't be posting replies that late at night :-)

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Dec 19 2006)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
_______________________________________________
DB-SIG maillist  -  DB-SIG@python.org
http://mail.python.org/mailman/listinfo/db-sig

Reply via email to