moreandres / pyodbc

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

Get SQLite data by column names instead of column ids #382

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Exec a select against SQLite database
2. Try to read the content of a column, by name
3. Attribute does not exist in "row", so you can access the value only using 
column id.

What is the expected output? What do you see instead?
The expected output is the content of the column, but I get "AttributeError: 
'pyodbc.Row' object has no attribute 'COLNAME'", where "COLNAME" is the column 
name and "Row" is an object made by "row = DBCursor.fetchone()"

What version of the product are you using? On what operating system?
Python 3.3.1 + pyodbc 3.0.7

Thanks!

Original issue reported on code.google.com by a.navarr...@gmail.com on 26 Aug 2014 at 7:15