If you're just looking to use SQLTABLE, you should be able to just send the 
results of executesql directly to SQLTABLE...I think.

Anthony

On Wednesday, November 16, 2011 3:43:56 PM UTC-5, David Watson wrote:
>
> Does anybody have example code showing how to package the return from 
> executesql as a gluon.sql.Rows object? 
>
> I have tried: 
>
>     raw_rows = legacy_db.executesql(sqlstr, as_dict=True) 
>     from gluon import sql 
>     columns = ['col1', 'col2', 'col3'] 
>     rowsobj = sql.Rows(legacy_db, raw_rows, columns) 
>     table = SQLTABLE(rowsobj) 
>
> but this blows up in sql.Rows. I'm just looking for a quick and dirty 
> (throw-away) way to do some reports with existing complex SQL queries. 
>
> Thanks, 
> Dave

Reply via email to