[Zope] Calling a Z SQL Method
Asad Habib
ahabib at engin.umich.edu
Thu Jan 27 10:43:28 EST 2005
I have a Z SQL method that contains a simple SELECT statement and takes
no arguments. When I call this Z SQL method from a DTML document/method I
use the following: <dtml-in retrieve_names_sql></dtml-in>
This works just fine.
However, when I place the Z SQL method inside a Folder called selects and
then use the following, I get an error:
<dtml-in "selects.retrieve_names_sql"></dtml-in>
The error I get is the following:
KeyError: 0
On the other hand, when I use the following I do not get an error:
<dtml-in "selects.retrieve_names_sql()"></dtml-in>
I understand the difference between the 2 <dtml-in> statements but why
isit that I have to explicitly show that retrieve_names_sql does not take
any arguments in the latter case and not the former. The id of this Z SQL
method/Zope object is retrieve_names_sql and it seems to me that this
should be recognized within the object hierarchy. Any help/input would be
greatly appreciated. Thank you.
- Asad
More information about the Zope
mailing list