Can you show the code that produces the 'records' object -- it looks like
it's already a SQLTABLE object rather than a DAL Rows object.
Anthony
On Friday, July 8, 2011 7:53:08 AM UTC-4, Valter Foresto wrote:
> I'm using the last version souces of web2py - Version 1.97.1 (2011-06-26
> 19:25:44) .
>
> With the view:
> {{extend 'layout.html'}}
> {{=SQLTABLE(records, truncate=None)}}
> I get the Traceback (most recent call last):
>
> File "C:\Users\valter\Desktop\ALTECH\web2py\web2py\gluon\restricted.py",
> line 192, in restricted
> exec ccode in environment
> File
> "C:\Users\valter\Desktop\ALTECH\web2py\web2py\applications\ALTECH\views\default/current_alarms.html",
> line 103, in <module>
> File "C:\Users\valter\Desktop\ALTECH\web2py\web2py\gluon\sqlhtml.py", line
> 1329, in __init__
> columns = sqlrows.colnames
> AttributeError: 'SQLTABLE' object has no attribute 'colnames'
>
>
> If I change the 'truncate' default in the 'sqlhtml.py' and use '
> {{=records}}' in the view all work fine.
>
> Many thanks Martin, I believe SQLTABLE is a great tool and hope to use it
> more but, actually, I'm not able to solve the error described above.
>
> -- Valter
>
>
>