On 12/12/06, Jorge Vargas <[EMAIL PROTECTED]> wrote:
> On 12/11/06, Marco Mariani <[EMAIL PROTECTED]> wrote:
> > I need to connect to more DBMS servers (both sqlalchemy, both autoload,
> > one postgres and one mysql) and would like to integrate nicely with the
> > existent structure
> >
> > Is there an example somewhere?
> > Do I just tinker with database.py or do you foresee a standard way to do
> > that in the current or following releases?
> >
> why not use 2 engine objects?

Sorry, but that's not very helpful. Obviously 2 engine objects are needed.

I have an application that uses a SQLite db for user managment and
session data, and then connects to two different MS-SQL databases
simultaneously - albeit on a read only access.

I'm afraid I can't provide you with an example, but you should be able
to more or less just mirror lines 22-48 in
http://trac.turbogears.org/turbogears/browser/trunk/turbogears/database.py
replacing the configuration key with your own, and storing references
to the metadata and session somewhere else.

Of course, you will have two different sessions, one for each
database. SA doesn't support sharing a uow session between multiple
engines - so beware that those sessions will not be flushed
automatically upon request finalization.

Arnar

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

Reply via email to