You are not logged in Log in Join
You are here: Home » Download Zope Products » Z Solid Database Adapter

Log in
Name

Password

 
 

Folder icon Z Solid Database Adapter

Z Solid DA

This is the Z Solid database adapter product for the Z Object Publishing Environment.

*** IMPORTANT ***

This product is distributed as a NON-BINARY release!

This product requires a compiled Python extension that is NOT included as a binary with this release. You must build or install the required extensions using the instructions below before the product will work properly!

Installation

The Z Solid database adapter uses a Solid (i.e. ODBC) extension module, sql. Before using the Z Solid Database Adapter, you must build the sql extension from the sources included in the Z Solid Database Adapter distribution.

The source files and associated files required to build the required Solid module are included in this product distribution. Follow the steps below to build the extension on UNIX platforms. Note that the included files do not support building on win32 platforms at this time.

  • Ensure that you have Python 1.5 or greater installed.
  • Ensure that you have Solid installed on your machine, INCLUDING THE FILES AND LIBRARIES NECESSARY TO DEVELOP Solid APPLICATIONS. If you do not have the developer files installed, you will need to download them from the Solid web site at http://www.solidtech.com/. Please contact the Solid maintainers with all questions pertaining to the use or installation of development files.
  • Ensure that you have extracted the ZSolidDA product distribution in your top-level Zope directory. This should have created a subdirectory named lib/python/Products/ZSolidDA containing the product files as well as this README file.
  • Build the extension.

    Change to the /src directory of your ZSolidDA product directory and issue the following commands:

              make -f Makefile.pre.in boot
              make
    

    Note that if the Python interpreter that will be used to run Zope is not run with the command python, then you must supply the command used to run Python as an option on the first make command. For example, if you run Python with the command python1.5.1, then use:

              make -f Makefile.pre.in boot PYTHON=python1.5.1
    

    This should create the file sql.so in your src directory. This file is a dynamically-linked library. Some versions of Unix (e.g. HP/UX) use a different suffix for dynamically-linked libraries.

    If errors occur when trying to build the extension, you may need to modify the Setup file to ensure that the correct Solid include and lib directory options are being passed to the compiler. For example, it has been reported that Solid 2.3 wants the library solcli to be linked rather than scllux22.a.

    Next, start Python and type "import MySQL", to make sure you can import the module without problems. If Python is unable to import the module, you may need to try rebuilding the module after adding the switch "-lgcc" to the Setup file.

    Finally, copy the output file sql.so up one directory into your ZSolidDA product directory and restart your Zope installation to complete the product installation.

The extension module, sql.c, was generated using the Simplified Wrapper and Interface Generator (SWIG). If you encounter problems building the extension module, you might try re-running swig. Assuming that you have swig installed, you can re-swig the module with the command:

        swig -python -o sql.c sql.i

Connection Strings

The connection string used for Z Solid Database Connection consists of:

  • solid server name,
  • user ID
  • password

The user ID and password may not contain spaces. For example, a connection string to connect to a server name of "upipe solid" with user ID "jim" and password "spam" would be:

        upipe solid jim spam

The server name may be a network name, such as upipe solid or tcpip spiff 1313. A logical data source name may also be used. Data source names are defined in the [Data Sources] section of the solid.ini file for database being used, as in:

       [Data Sources]
       demo=upipe solid, Default DB at tarzan.digicool.com

Note, however, that to use logical data source names, it is necessary to set the SOLIDDIR environment variable to the location of the solid database being used in your Zope PCGI resource file, as in:

      SOLIDDIR=/usr/local/solid/database/default

Setting this variable may be necessary for other reasons, depending on how Solid is configured on your system.

 Title   Type   Size   Modified   Status 
 2.0.0 Edit object Software Release   2000-02-11 published