[Zope-DB] Using dynamic ZSQL objects

Dieter Maurer dieter at handshake.de
Thu May 20 15:31:13 EDT 2004

TOM HAVILAND wrote at 2004-5-19 13:52 -0400:
> ...
>def TestQuery(dbconn):
>  query = SQL.SQL("id","title", dbconn, "", "select * from msp_projects")
>  return query

Usually, you *MUST* provide complete error info when you report
problems ("Error type", "Error value" and traceback)!

Fortunately, this time, the problem is simple enough:

  You must acquisition wrap your Z SQL Method (with "__of__").
  Otherwise, the method is unable to locate the corresponding

  To do this, you need an acquisition wrapped object. Try:

     def TestQuery(self, dbconn):
       query = ...
       return query.__of__(self)


More information about the Zope-DB mailing list