On 15.Apr.2002 -- 02:17 PM, Michael Raffenberg wrote:
> OK, once again. Here is actual code:
>
> <esql:execute-query>
> <esql:call>{call cocoon_proc(<esql:parameter direction="inout"
>type="String">'123'</esql:parameter>)}
> </esql:call>
> <esql:call-results>
> <esql:results>
> <esql:result><esql:get-string column="1" from-call="true"/></esql:result>
> </esql:results>
> </esql:call-results>
> </esql:execute-query>
>
> returns:
> org.apache.cocoon.ProcessingException: Language Exception:
>org.apache.cocoon.components.language.LanguageException: Error compiling
>Merci_Dics_xsp:
> Line 451, column -1: inconvertible types
> Line 0, column 0:
> Here is the Code from merci_dics.xsp (445-470):
>
> // nested result set
> if (_esql_query != null) {
> _esql_queries.push(_esql_query);
> }
> _esql_query = new EsqlQuery((ResultSet)
>
> (_esql_query.getCallableStatement().getString(1) <-- 451
> )
> );
OK, I've been blind (and you've been stupid ;-)
You try to construct a result set from a string. That is obviously
impossible. So, if you want to use the above syntax *and* your SP does
return a result set object for that parameter, you'd need to
<esql:get-object/> inside <esql:result/>. Please be aware that line
breaks inside <esql:result/> could spoil your party. But then you'd
need to have another <esql:results/> nested inside your
<esql:results/>...
If your SP does not return a ResultSet for that parameter, use
<esql:call-results/> which are executed regardless of the result
returned by the SP. Use <esql:get-string from-call="yes" column="1"/>
to access it.
If your SP returns exactly one ResultSet through e.g. parameter 1, you
could use <esql:call resultset-from-object="1">{.....}</esql:call> and
save yourself the trouble of constructing a new query result.
Your example code mixes two of these approaches.
HTH
Chris.
--
C h r i s t i a n H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08
---------------------------------------------------------------------
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]>