Re: Multiple databases connection
Andrew Veitch <[email protected]>
| Newsgroups | gmane.comp.web.zope.database |
|---|---|
| Message-ID | <[email protected]> |
If you add a ZSQL Method and then go to the 'Advanced' tab you can specify a 'Connection Hook'. This should be the name of a Python Script or some other method which will return the name of the database connection to use allowing you to dynamically change the DB connection. A On 9 Jun 2006, at 06:19, Infor Gates wrote: > My apologies if my query is unclear. > M.Banaouas got it right. Let try to explain it another way: > 1. We have a standard Zope application which is replicated in ZMI. > 2. the difference in each Zope application is DBconnection. > 3. Each DBconnection is connection to each Branch database. > > In other words, if I have 10 branches, I will replicate 10 times of > the > same Zope application which is not a wise thing to do. As such, > I exploring to find a way if there is "dynamically" way to > change the db connection to the intended (branch) database. > Thus eliminating the Zope application replication. > > Thank you. > > CY > > ----- > > May be "dynamically database connection" means that we use the same > "Z > > SQL Method" with different database connections (in the same Zope > > Instance, of course). So we can change "dynamically" from one > database > > to another (schema-equal). > > > > In other words, is it possible to define "database connection" > property > > of a "Z SQL Method" like we do for parameters ? > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > _______________________________________________ > Zope-DB mailing list > [email protected] > http://mail.zope.org/mailman/listinfo/zope-db