[Zope] multiple MySQLDB connections.

Maik Jablonski maik.jablonski@uni-bielefeld.de
Thu, 15 Aug 2002 09:24:16 +0200


Dennis Allison wrote:
> Argh... I have a database access problem.  I have two database serviced
> by the same MySQL server.  MySQL  database adaptors are bound to a
> particular database with their connection string and appear to have
> a fixed name which is found by acquisition (or so it appears).   If I
> want to access two databases, it looks like I want to have two MySQL
> database adaptors.  The topology of my site is such that both adaptors
> really need to be in the same folder.  But that causes a name conflict
> because of the naming conventions.
> 
> What to do?

You must [and can] give different Id's to different 
MySQLDatabaseAdapters. Simply change the Id when adding a new 
Database-adapter.

It's useful to use "speaking" Id's anyway... Something like:

DB_Cases
DB_Problems
...

should do it!

cheers, maik
-- 
Maik Jablonski                 __o
www.zfl.uni-bielefeld.de     _ \<_    Deutsche Zope User Group
Bielefeld, Germany          (_)/(_)               www.dzug.org