[Zope] passings vars to sql method

Jordan B. Baker jbb@spyderlab.com
Mon, 22 Mar 1999 18:26:00 -0500 (EST)


On Mon, 22 Mar 1999, Fredy Villa wrote:

> Zopists,
> 
>     I run into a problem. I have a DTML Methos that call an SQL Method.
> The SQL method, displayTasks, has two parameters, userID and statusID.
> 
> The DTML method does have access to the variables userID and statusID
> prior to calling the sql method with a <!--#in--> tag.
> 
> The DTML method looks like this:
> 
<SNIP>
> --------------------------------------------------
> I basically can't run the query because it cannot get a value for userID
> or statusID.
> How do I pass these vars to the sql method from a dtml method???

Freddy, did you make the variables you are passing to your SQL method
parameters of the SQL method?  If not they won't be looked up in the
request, they will only be searched via acquisition.

This is described in the Z SQL guide where it shows the order of lookup
for SQL method parameters.

Have fun!

> Thanks in advance,
> 
> Fredy Villa
> FVilla@GestaltTechnology.com

-------
Jordan B. Baker -- jbb@spyderlab.com
weaving the web @ http://www.spyderlab.com