Why not create a different engine for that database ?

--- On Thu, 12/3/09, Peter <[email protected]> wrote:

> From: Peter <[email protected]>
> Subject: [sqlalchemy] how to change a database
> To: [email protected]
> Date: Thursday, December 3, 2009, 4:37 AM
> Hi
> 
> Lets suppose I created an engine on database 'foo' and I
> want to create 
> a database 'bar' and then do my work on 'bar'.
> What is the recommended way to do this ?
> 
> connection.execute('CREATE DATABASE IF NOT EXISTS bar')
> connection.execute('USE bar')
> 
> The former command succeeds with a warning ( already
> discussed on this 
> list ) but the latter seems to be the wrong approach:
> 
> ...
> 2009-12-03 13:28:39,221 INFO
> sqlalchemy.engine.base.Engine.0x...b0ec COMMIT
> TypeError: "'NoneType' object is not callable" in
> <function <lambda> at 
> 0x8821bc4> ignored
> 
> 
> Thanks a lot for your advice
> Peter
> 
> --
> 
> 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.
> 
> 
> 


      

--

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