The Zope Experts, I am a new user in zope, then there is a need for me to incorporate an existing database of an org. into their newly design website so that user can query the database. Presently i don't know any single thing on how to do this. But before i started craking my brain i want to you to give me the fundamental concept of how this thing work. Tkanks in anticipation for your supports. Hamzat kamal
Hi Hamzat, Welcome to Zope! There is a really nice section in the Zope Book on using a relational database with Zope. Check it out at: http://www.zope.org/Members/michel/ZB/RelationalDatabases.dtml That chapter will at least give you a good high level perspective on using an RDBMS with Zope. Good luck, Eric.
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Hamzat kamal Sent: Saturday, August 11, 2001 10:00 AM To: zope@zope.org Subject: [Zope] Db connectivity with Zope
The Zope Experts,
I am a new user in Zope, then there is a need for me to incorporate an existing database of an org. into their newly design website so that user can query the database. Presently i don't know any single thing on how to do this. But before i started craking my brain i want to you to give me the fundamental concept of how this thing work.
Tkanks in anticipation for your supports.
Hamzat kamal
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
I am a new user in zope, then there is a need for me to incorporate an existing database of an org. into their newly design website so that user can query the database. Presently i don't know any single thing on how to do this. But before i started craking my brain i want to you to give me the fundamental concept of how this thing work.
Note that I'm going on the assuption (as I read elsewhere) that you're working with an existing MS Access database. I might warn that Access is probably not going to be a good solution if you're planning on pounding on it. Here's a quick startup plan: o download and install the ZODBC database adapter product. Get it from zope.org. Note that it is binary-only, and if you're running Zope 2.4 (or any Python not 1.5.2) you'll need the new version. o set up your database as an ODBC source, and create a ZODBC Database Connection (yay acronyms!) with this source. o create ZSQL Methods that use this connection to query your database for whatever data you need. You'll need to know some SQL and probably some DTML as well. Use the Zope help link and look in Zope Help > DTML Reference for dtml-sql* tags. What these allow you to do is dynamically create SQL statements that are sent to the database. o create Zope objects that use these ZSQL Methods to render the data. In DTML you're usually using the 'dtml-in' tag on a ZSQL method and 'dtml-var's on the contents. Similar in ZPT and Python Scripts. Not very hard. Remember though that if you want to pass data to a ZSQL Method, you have to put the attribute in the 'Arguments' field, and ZSQL Methods only reliably find arguments in the REQUEST of the document that uses it. This isn't a problem if the data comes from a form POST or GET, but if it comes from anywhere else you'll have to do something like <dtml-var "REQUEST.set('attrib','value')"> before you use the method. --jcc (something to do)
participants (3)
-
Eric Walstad -
Hamzat kamal -
J. Cameron Cooper