Why send legacy_db into sql.Rows()?
It is not needed for anything at that point.
Maybe just send in None or some default as the first arg.

On Nov 16, 2:43 pm, David Watson <davidthewat...@gmail.com> 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