[Zope] newbie: stupid Access zsql problem

andy andy@bigorangelovebus.net
Thu, 20 Feb 2003 21:39:28 +0000


Hi,

Going out of my brain here. I want to create a method in Zope that goes
off and replicates a current Access query, and am falling over at the
same hurdle every time.

The WHERE line of the current Access query reads:

WHERE ((([Daily Orders].Date) Between [Enter the beginning date] And
[Enter the end date]))

If I replace [Enter the beginning date] and [Enter the end date] with
#mm/dd/yyyy# and #mm/dd/yyyy# then I get the expected output when
testing my database connection in Zope. So now I have the form that
collects those dates in the correct order from the user;

<form method=POST action="query">
Enter the start date: <input type=text name=startdate size=10 maxlength=10>
<p>
Enter the end date: <input type=text name=enddate size=10 maxlength=10>
<p>
<i>Ensure dates are entered in mm/dd/yyyy format</i>
<p>
<input type=submit>
</form>

... and I want to pass those values into the ZSQL Method, and this is
the part I can't get my head round. I presume these values now exist in
the REQUEST? So do I put instructions into the ZSQL method in place of
the [Enter the start date] and [Enter the end date] fields to fetch the
info from REQUEST? If so, then I must be reading this manual wrong
because I can't get it to happen ;-) If anyone can guide me in what I
should go learn to tie the form to the query I'd be eternally grateful,
and promise not to offer to do favours for people again until I study a
bit harder.

andy