On Feb 5, 2008, at 2:26 AM, andrewjg wrote:

> When I run the above code, I get an error at the point indicated
> above:
>
>  File ".../SQLAlchemy-0.4.2p3-py2.4.egg/sqlalchemy/sql/
> expression.py", line 991, in execute
> InvalidRequestError: This Compiled object is not bound to any Engine
> or Connection.
>
> Whichever way I can get this to work would be great. Thanks in advance
> for any help.
>

a SQL expression object needs to be bound to an engine if you'd like  
to say expression.execute().  otherwise you need to execute it in the  
context of an Engine, Connection, or a Session which is bound, such as  
engine.execute(expr), connection.execute(expr),  
session.execute(expr).    detail on expicit/implicit execution is  
here:  http://www.sqlalchemy.org/docs/04/ 
dbengine.html#dbengine_implicit , executing with a Session is here:  
http://www.sqlalchemy.org/docs/04/session.html#unitofwork_sql

hope this helps !

- mike



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

Reply via email to