[Zope] How do I create a cursor on a query in Zope

Evan Simpson evan@tokenexchange.com
Thu, 26 Aug 1999 15:11:03 -0500


A little testing reveals that you'll have to explicitly pass the values from
the outer ZSQL to the inner one, as in:

<!--#in SQL_Statement size=60 start=query_start-->
 <!--#in "SQL_Statement2(f1=f1, f2=f2)" size=60 start=query_start-->
 <!--#/in-->
<!--#/in-->

where f1 and f2 are fields in the result from SQL_Statement.  I'm not sure
why this is, since I thought that declared parameters would be automatically
be found in the current context.

----- Original Message -----
From: Marten Quadland <mquadland@indigonetworks.com>
> With the old syntax:
>
> I can not run a call to a ZSQL Method inside another:
>
> <!--#in SQL_Statement size=60 start=query_start-->
>  <!--#in SQL_Statement2 size=60 start=query_start-->
>  <!--#/in-->
> <!--#/in-->
>
> This statement fails every time for me, but the queries run fine
separately.