.executesql() doesn't return a Rows object unless you pass in fields. Are
you showing the *exact* code? Did you copy the exact application from one
machine and move it to another, or are there any differences at all?
Anthony
On Monday, October 26, 2015 at 3:29:40 AM UTC-4, DucVa wrote:
>
> Hi all,
> I define a table as below:
> db.define_table('partner',
> Field('name')
> )
> In controller, I use execute to get data:
> sql = 'select name from partner'
> rows = db.executesql(sql)
> In my laptop, type of rows is LIST, but in other computer in my company,
> type of rows is ROWS.
> So, when i print data, raise error.
> for row in rows:
> print row.name
> I get an error: 'Row' object has no attribute 'name'.
> But in other computer, my code runs very well.
> I use web2py 2.12.3, python 2.7.8, mssql 2008 r2.
> Please help me. Regard!
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.