WanderInCode / pyodbc

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

Sybase: returning result columns in incorrect order when nulls present #323

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
table e.g.:
  A  B  C   D    E    F
============================
  1  2  3  null null  4

results = cursor().execute('select * from table')

results.fetchone()
(1, 2, 3, 4, null, null)

results.description
('A', 'B', 'C', 'D', 'E', 'F')

I.e. zipping the description and the results assigns the wrong values.

This seems to occur especially for columns whose returned values were null 
(None).

Original issue reported on code.google.com by wil...@gmail.com on 20 May 2013 at 4:46