Loopback59 / pyodbc

Automatically exported from code.google.com/p/pyodbc
MIT No Attribution
0 stars 0 forks source link

oracle 11gR2 odbc driver fails on executemany #386

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Install pyodbc
2. Install oracle 11gR2 ODBC client
3. Run a simple script with execute many

conn = pyodbc.connect('Driver={Oracle in 
OraClient11g_home1};Dbq=ORCL;Uid=user;Pwd=passw')
conn.execute('create table t(name varchar2(10), id number)')
params = [ ('A', 1), ('B', 2) ]
cur=conn.cursor()
cur.executemany("insert into t(name, id) values (?, ?)", params)
cur.execute('select * from t').fetchall()

What is the expected output? What do you see instead?

the correct output is:
[('A', 1.0), ('B', 2.0)]

instead I see:
[('A', 1.0), ('A', None)] 

What version of the product are you using? On what operating system?

pyodbc version 3.0.7
python version 2.6.6 64bit
Windows 7 64 bit

Please provide any additional information below.

Original issue reported on code.google.com by nimar.arora@gmail.com on 13 Nov 2014 at 6:37