#4896: Buggy implementation of executemany for oracle
-------------------------------------+--------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: adrian
Status: new | Component: Database wrapper
Version: SVN | Keywords: oracle executemany
Stage: Unreviewed | Has_patch: 0
-------------------------------------+--------------------------------------
The following example shows the buggy implementation. The same example
works fine with sqlite and postgresql.
{{{
cursor = connection.cursor()
cursor.execute('create table test (Field1 NUMBER(11),Field2 NUMBER(11))')
cursor.executemany('insert into test values (%s, %s)', [(i,i+1) for i in
range(1,100)])
}}}
It returns the following error message:
{{{
File "C:\packages\Python-2.5\lib\site-
packages\django\db\backends\util.py", line 30, in executemany
return self.cursor.executemany(sql, param_list)
File "C:\packages\Python-2.5\lib\site-
packages\django\db\backends\oracle\base.py", line 125, in executemany
query, params = self._rewrite_args(query, params)
File "C:\packages\Python-2.5\lib\site-
packages\django\db\backends\oracle\base.py", line 101, in _rewrite_args
query = smart_str(query, self.charset) % tuple(args)
TypeError: not all arguments converted during string formatting
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/4896>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---