[Zope-DB] Using dynamic ZSQL objects
TOM HAVILAND
THAVILAN at suss.com
Thu May 20 16:19:10 EDT 2004
Thanks for the tip! I'll try and provide better information in the future.
Tom
>>> Dieter Maurer <dieter at handshake.de> 05/20/04 03:31PM >>>
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
DA.
To do this, you need an acquisition wrapped object. Try:
def TestQuery(self, dbconn):
query = ...
return query.__of__(self)
--
Dieter
More information about the Zope-DB
mailing list