[Zope] Python scripts - DB connection question...

Lee lee.reilly@ntlworld.com
Wed, 04 Jul 2001 22:49:04 +0100


Hi there,

I haven't used Zope for a few months - I'm now using Python scripts
instead of the Python method product. They don't appear to be too
dissimilar, but I'm having a little trouble trying to execute an SQL
query from a script. In a Python method it would be something like:

    db_conn = self.Gadfly_database_connection()
    // generate SQL
    result=db_conn.query(updatePersonSQL)

This doesn't work in a script though. Could someone how to estabish a
connection and execute a query?

Thanks in advance.

- Best regards,

Lee