the error message is the same with and without the quotes - for string
parameters or int parameters. i've tried numerous combinations. if i put in
an explicit value it works - but i can get it to reference a parameter from
the result set from Access. It will work if the backend is MySQL.
>From the reading I've done today - the MS Access ODBC driver does not
support nested transactions according to the microsoft support site. So I'm
thinking the problem with the nested query is specific to Access.
marty
----- Original Message -----
From: Christopher Painter-Wakefield <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 19, 2001 6:57 AM
Subject: Re: esql nested query not working - 1.8.2
>
> do you get a different error message when you leave out the quotes?
>
>
>
>
> Please respond to [EMAIL PROTECTED]
>
> To: <[EMAIL PROTECTED]>
> cc:
>
> Subject: Re: esql nested query not working - 1.8.2
>
>
> I've tried it both with and without the single quote and it still doesn't
> work.
>
> Here is another clue - the nested query works if I run it against a MySQL
> database, it just doesn't work against a Access database.
>
> In a couple of months - we'll be converting the access database. In the
> meantime, is there a solution ( that will work with the access database )?
>
> marty
> ----- Original Message -----
> From: Christopher Painter-Wakefield <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, September 18, 2001 9:41 AM
> Subject: Re: esql nested query not working - 1.8.2
>
>
>
> 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]>
>
>
---------------------------------------------------------------------
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]>