[Zope] How to pass arguments to ZSQL-Methods?

Rik Hoekstra rik.hoekstra@inghist.nl
Mon, 03 Apr 2000 09:54:49 +0200


Jason Wong wrote:
> 
> I'm trying to pass some arguments to a ZSQL method using the following:
> 
> <dtml-in "_[qry_name](_.None, _, column='Model', table='Panels',
> criteria='1=1')">
> 
> where qry_name *contains* the name of the ZSQL method that I want to use,
> 
> but it gives this error:
> 
> Error Type: Bad Request
> Error Value: ['column', 'table', 'criteria']
> 
> which suggests that the stuff after "_[qry_name]" is not evaluated thus the
> arguments are not passed onto the ZSQL method.
> 
> I then tried something like this:
> 
> <dtml-let column='Model'
>           table='Panels'
>           criteria="'1=1'">
> <dtml-in "_[qry_name]">
>   :  :  :
>   :  :  :
> </dtml-in>
> </dtml-let>
> 
> This gives the same error as above.
> 
> Any help in getting either of the above to work is appreciated
> 

ZSQL methods only accept explicit arguments (that is: the ones you have
specified in defining the methods). This seems to be your problem.

Rik