[Zope] newbie: stupid Access zsql problem
Chris Beaven
chris@d-designz.co.nz
Fri, 21 Feb 2003 11:07:37 +1300
ZSQL Methods have a field "Arguments" where you can place the variables
from the request you would like to use in the method. Seperate them with
spaces. So in this case Arguments should contain "startdate enddate" (no
quotes).
Then just use <dtml-var startdate fmt="#%s#"> (unfortunately, you can't
use dtml-sqlvar because it would quote the result)
andy wrote:
>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
>
>
>
>_______________________________________________
>Zope maillist - Zope@zope.org
>http://mail.zope.org/mailman/listinfo/zope
>** No cross posts or HTML encoding! **
>(Related lists -
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
>
>
>