EIONET European Environment Information and Observation Network * * * EIONET Training Zope absolute beginner's course Built-in tools (presentation and best practice): Database connectivity: MySQL and LDAP Monday, 27 Oct Tuesday, 28 Oct 2003 Hermann Peifer, Project Manager EIONET Data Flow Version
2 Example #1: Zope and MySQL ZMySQLDA Database Adapter Product ZSQLMethods ZSQL Methods Product
3 ZMySQLDA and ZSQLMethods ZMySQLDA is the MySQL database adapter product for ZOPE. The Z MySQL database adapter product requires that the Python MySQLmodule extension is installed. Z SQL Method Object: Query relational databases with SQL Z SQL Methods allows you to access data in SQL databases. Z SQL Methods define and call SQL statements on databases which are defined by database adapter objects. To create a new Z SQL Method you will need to setup a database adapter first.
4 MySQL Demo Folder (Use the View DTML Source function) ZSQLMethods to access the database ZMySQLDA Database Connection DTML Methods To render the ZSQL query results on the Zope site
5 Z SQL Method at /wdbgw/select_country_body
6 Available GWbodies Country ID Country Name No. of bodies "> DTML Method at /wdbgw/index_html (Countries and No. of Gwbodies) HTML table with column headers DTML loop using ZSQL Method to render the query results
7 Search results on the Zope web site
8 Example #2: Zope and LDAP ZLDAPConnection Database Adapter ZLDAPMethods ZLDAP Filter Methods
9 ZLDAPConnection and ZLDAPMethods ZopeLDAP Product consists of 2 products in the same release Downloadable at: ZLDAPConnection is the LDAP database adapter product. For managing connections to LDAP Servers and returning Zope-ish entry objects. It needs David Leonard's ldapmodule, from 2. ZLDAP Filter Methods for querying LDAP Servers ZLDAP Filter Methods allows you to browse an LDAP database. Known problems with the transactional behaviour, but connection can be run in a non-transactional mode.
10 ZLDAP Database Connection DTML Documents to render the ZLDAP query results on the Zope site ZLDAP Methods to search in the LDAP database LDAP Search Folder
11 LDAP Filter at /quick/search_users
12 No UserID Name Organisation DTML Document at /quick/list_users (Results of users search) HTML table with column headers DTML loop using ZLDAP Method to render the query results
13 Search results on the Zope web site