On Oct 7, 9:58 pm, "[email protected]"
<[email protected]> wrote:
> Many thanks for such a quick answer. A second question (if I may). I
> have a second query that returns a single row - how would I store that
> in the session as trying as_list gives me an error:
>
> KeyError: 'as_list'.
>
> many thanks (again).
>
> p.s I've bought the PDF of the second version of the book but could
> not find it in there.
>
> cheers
>
> Portly
>
> On Oct 7, 7:42 pm, mdipierro <[email protected]> wrote:
>
>
>
> > if
>
> > rows=db().select(...)
>
> > you cannot store rows in a session because it includes an open db
> > connection.
> > You can store
>
> > rows.as_list()
>
> > On Oct 7, 1:35 pm, "[email protected]"
>
> > <[email protected]> wrote:
> > > Hi - I am new to Web2py and think it is great but I'm stuck. Is there
> > > a limit on what i can store in the Session? I want to store the the
> > > results of a sql query (returning 40 records) in the session. When I
> > > try I get an exception:
>
> > > Traceback (most recent call last):
> > > File "gluon/main.py", line 419, in wsgibase
> > > File "gluon/globals.py", line 368, in _try_store_on_disk
> > > File "copy_reg.pyc", line 73, in _reduce_ex
> > > File "gluon/sql.py", line 537, in __getattr__
> > > KeyError: '__getstate__'
>
> > > any ideas?
>
> > > many thanks
>
> > > Portly
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---