Try removing the single quotes around <esql:parameter  type
="string"><esql:get-string ancestor="1"  column="rid"/></esql:parameter>

I think by including the single quotes you are making a query that doesn't
use parameters (your where clause looks like "... Main.rid = '?' ", e.g.,
the literal string '?').

-Christopher




Please respond to [EMAIL PROTECTED]

To:   <[EMAIL PROTECTED]>
cc:

Subject:  esql nested query not working - 1.8.2




I would like to execute a nested query.  When  I try to reference a
parameter from the ancestor query I get a  java.lang.RuntimeException:
Error setting parameter on statement : Select title  from Main where
Main.rid='?'

I would greatly appreciate any suggestions.  I  have tried to emulate the
example esql - but I can not get it to pick up the  parameter.  If I
hardcode the value - the nested query works.

In searching the list - I found a similar posting in January for this error
- but no suggestion/solution was posted.

I am running tomcat/cocoon 1.8.2 on Windows 98 and pointing to an access
database.

marty


I am attaching the related code below:


<snip>

<!-- here is the problem line - if I hardcode the rid this works  -->

<esql:query>Select title from Main where Main.rid='<esql:parameter  type
="string"><esql:get-string ancestor="1"  column
="rid"/></esql:parameter>'</esql:query>

<snip>




---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to