How should I execute SA queries in Pylons controllers? (without using
mapping)

The using of sqlalchemy.sql.select (as whown in SA tutorial gives an error 
"<class 'sqlalchemy.exceptions.InvalidRequestError'>: 
This Compiled object is not bound to any Engine or Connection." 

My code is:

from tcounter.model import stats_table #my table
from sqlalchemy.sql import select

#in controller's method:
s = select([stats_table])
res = s.execute()

data = res.fetchall()


RUsh


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to