| Issue 282: | row object acessing fields by name | |
| 1 person starred this issue and may be notified of changes. | Back to list |
When using "select *" the fields cannot be accesses by name in the row object. this will be a very handy feature as already is in trhe other cases. Using sql server 2000 and 2008 express, python 2.7
Aug 16, 2012
Project Member
#1
mkleehammer
Status:
Investigating
Aug 17, 2012
Sorry when doing the example, below I saw it was a case error in fieldname.
Uses to sqlserver and delphi c++ that was not an issue before
import pyodbc
con = pyodbc.connect('DRIVER={SQL Server};SERVER=srv-sql;DATABASE=ina;UID=sa;PWD=jfk')
c = con.cursor()
print [r.column_name for r in c.columns('terceiro')]
for r in c.execute('select top 100 * from terceiro'):
print r.Nome
con.close()
Aug 17, 2012
By the way thank you for pyodbc, I'm changing a lot of stuff to it, and will do more. Will try do run django width it.
Sep 26, 2012
(No comment was entered for this change.)
Status:
NoFix
|