[Zope] Database Adapter Madness

Daniel Jackson djackson@tigerbyte.com
21 Jan 2003 13:15:53 -0600


I'm writing a ZClass for a generic SQL table editor. It detects the
format of the table, and generates a sortable table with add/edit/delete
functions. The ZClass itself is tied to a Database Adaptor that has to
be hardcoded to connect to a certian database. This is bad, I need each
instance to point to a different database. I cannot find any way to
change what database the DA connects to in python or by any other
method. If you change the connection string, it affects all of the
instances of the zClass. I'm at a loss for ideas on how to do this
properly. Right now I have a Psycopg DA inside of the ZClass. Anyone
have any hints?