As far as the creation I'm no help, but I have done something similar
by connecting to different schemas in oracle. By setting the schema
argument on your table objects, you can bind them to a particular
database(schema), by changing the value of the schema argument, you
can switch from one database to another. I normally have a table
initializer method that I can pass the schema argument to to handle
this functionality.


On Dec 3, 4:37 am, Peter <[email protected]> wrote:
> 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.


Reply via email to