My favorites | Sign in
Project Home Downloads Wiki
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 400: Python 3 and PyOdbc3.0.10 AttributeError when accessing row columns by column-name.
1 person starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


 
Reported by loreproj...@gmail.com, May 27, 2015
What steps will reproduce the problem?
1. select mycolumnname from mytable where myclause
2. iterate over Row data and try accessing via column name
3. using Python 3 and pyodbc3.0.10 on windows connecting to a MS SQL server using either standard "SQL Server" driver or "SQL Server Native Client 10" driver.

What is the expected output? What do you see instead?
I should be able to access row column data by the column header names.
using an example SQL statement of say "select adminuserid from adminuser;"
records are returned but when iterating over row data, accessing theRow.adminuserid throws an error...
>>>> "AttributeError: 'Row' object has no attribute 'adminuserid'"
(NOTE: the data in each Row IS accessible via position syntax but not by name)

What version of the product are you using? On what operating system?
Using pyodbc3.0.10 on Windows 7, via Python 3, connecting to MS SQL Server 2008 database.

Please provide any additional information below.
This has worked for years using Python 2.7, but my new application is now in Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (Intel)]

Jun 15, 2015
#1 loreproj...@gmail.com
Please ignore this issue, it was from another cause.

Powered by Google Project Hosting