[Zope-DB] Querying many DBs from one set of SQL methods?
Andy McKay
andym@ActiveState.com
Mon, 17 Sep 2001 12:31:46 -0700
A hack I use to do the same thing:
http://aspn.activestate.com/ASPN/Mail/Message/536907
Cheers.
--
Andy McKay.
----- Original Message -----
From: "Stuart Nicholson" <stuart.nicholson@wirelessdatanz.com>
To: <zope-db@zope.org>
Sent: Sunday, September 16, 2001 9:49 PM
Subject: [Zope-DB] Querying many DBs from one set of SQL methods?
> The itch: I need to have a single set of Z SQL methods that can be run
against multiple databases as part of a common web interface driven by data
held in different client's
> databases.
>
> A problem: However when defining a Z SQL method you are required to select
an existing Zope Database Connection instance that the SQL method will run
against.
>
> A scatch?: To me (being something of a Zope novice), it would appear to
scratch my itch I have to 'copy and paste' into different folders (say one
per client), duplicating my
> common SQL methods, defining the appropriate DB Connection in each folder
and then changing each duplicated SQL method to point to that connection.
This seems a rather
> inelegant solution.
>
> Is there a better way?: I haven't tried but imagine I can programatically
change the DB Connection properties prior to running each request. Is this a
viable solution? Will
> this work with multiple clients running the same query for example? Can
anybody suggest a better solution?
>
> Thanks in advance,
>
> Stuart Nicholson
> Software Engineer
> Wireless Data
>
>
> ----------------------------------------------------------------------
> The information contained in this communication is intended solely for the
use of the individual or entity to whom it is addressed and others
authorised to receive it. It may
> contain confidential or legally privileged information.
> If you are not the intended recipient you are hereby notified that any
disclosure, copying, distribution or taking any action in reliance on the
contents of this information is
> strictly prohibited and may be unlawful.
> If you have received this communication in error, please notify us
immediately by responding to this email and then delete it from your system.
> Wirelessdata Ltd is neither liable for the proper and complete
transmission of the information contained in this communication nor for any
delay in its receipt.
> ----------------------------------------------------------------------
>
>
> _______________________________________________
> Zope-DB mailing list
> Zope-DB@zope.org
> http://lists.zope.org/mailman/listinfo/zope-db
>