cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Painter-Wakefield" <paint...@mc.duke.edu>
Subject Re: esql nested query not working - 1.8.2
Date Tue, 18 Sep 2001 16:41:20 GMT

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 cocoon-users@xml.apache.org

To:   <cocoon-users@xml.apache.org>
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message