[Zope] passings vars to sql method

Fredy Villa FVilla@GestaltTechnology.com
Mon, 22 Mar 1999 17:25:28 -0500


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:

<!--#var standard_html_header-->
<H2> <!--#var document_title--></H2>
<P><b><!--#in getUsers--><!--#var name--><!--#/in--></b></P>
List of tasks: <form action=displayUser method=post>

<SELECT NAME=statusID>
<!--#in listStatus-->
<OPTION VALUE=<!--#var statusID-->><!--#var keyword-->
<!--#/in-->
</SELECTED>
<input type=hidden name=userID value=<!--#var userID-->>
</form>
<table>
<!--#in displayTasks-->
<tr><td><!--#var taskID--></td><td><!--#var description--></td><!--#var
priority--><td><!--#var </td></tr>
<!--#/in-->
</table>
<!--#var standard_html_footer-->



THE SQL methos look like this:
select *
from task_schedule where
task_schedule.userID = <!--#sqlvar userID type=string--> AND
task_schedule.statusID = <!--#sqlvar statusID type=int-->

--------------------------------------------------
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???

Thanks in advance,

Fredy Villa
FVilla@GestaltTechnology.com