[Zope] Calling ZSQL methods with implicit arguments
Júlio Dinis Silva
juliodinis@hotmail.com
Thu, 24 Jan 2002 16:07:45 +0000
>However simple this looks, it seems that when I use the ZSQL method >inside
>an expression I must use Explicit arguments, meaning I can't >do something
>like
>
><dtml-let results="myZsqlMethod">
> ...
></dtml-let>
Are you sure? This should be possible. What traceback do you get?
What do you want to store? The records from the zsqlmethods or the
zsqlmethod Results object, i.e, one list of <r instance at xyz> instances or
a <Shared.DC.ZRDB.Results.Results instance at xyz> instance?
Another Option (store <Shared.DC.ZRDB.Results.Results instance>) :
<dtml-call "REQUEST.set('Results',MyZsqlMethod)">
... and later....
<dtml-in Results>
...
</dtml-in>
Another Option (store a list of <r instance>):
<dtml-call "REQUEST.set('results',[])">
<dtml-in MyZsqlMethod>
<dtml-call "results.append(_['sequence-item'])">
</dtml-in>
..later..
<dtml-in results>
...
</dtml-in>
Regards,
Julio Silva
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.