cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Bachta" <tbac...@kopent.com>
Subject RE: esql:query problem
Date Wed, 25 Jun 2003 15:32:00 GMT
My code now looks like this w/out the <user-results> tag:
<esql:execute-query>
<esql:call>{call rptLocationDeviations(<esql:parameter direction="in"
type="Int"><xsp:expr>number</xsp:expr></esql:parameter>, <esql:parameter
direction="in" type="String"><xsp:expr>room</xsp:expr></esql:parameter>,
<esql:parameter direction="in"
type="String"><xsp:expr>beginTime</xsp:expr></esql:parameter>,
<esql:parameter direction="in"
type="String"><xsp:expr>endTime</xsp:expr></esql:parameter>)}</esql:call
>
<esql:call-results>
<esql:result><xsp:expr>(ResultSet)<esql:get-object column="1"
from-call="true"/></xsp:expr></esql:result>
<esql:results>
<esql:row-results>
<test><esql:get-string column="1"/></test>
</esql:row-results>
</esql:results>
</esql:call-results>
</esql:execute-query>

and I get back a different error message now:

org.apache.cocoon.ProcessingException: Exception in
ServerPagesGenerator.generate():
org.apache.avalon.framework.CascadingRuntimeException: Error getting
ascii data for column 1

We may be getting closer?  Thanks for all the help.

Tim Bachta
 

-----Original Message-----
From: Christian Haul [mailto:haul@dvs1.informatik.tu-darmstadt.de] 
Sent: Wednesday, June 25, 2003 10:20 AM
To: cocoon-users@xml.apache.org
Subject: Re: esql:query problem

On 25.Jun.2003 -- 09:53 AM, Tim Bachta wrote:
> Here is my code in plain Java:

<snip/>

>                     CallableStatement stmt = con.prepareCall("{call
rptLocationDeviations(?,?,?,?)}");
>                     stmt.setInt(1, 199);
>                     stmt.setString(2, "Rm 130 B");
>                     stmt.setString(3, "5-20-2003");
>                     stmt.setString(4, "6-20-2003");
>                     ResultSet res = stmt.executeQuery();
>                     while (res.next())
>                     {
>                         System.out.println("Result set is working");
>                     }

<snip/>

Mmmh, this looks very simple. You have no out parameters and you get a
result set back.

> Here is what I have in my xsp:
> 
> <esql:execute-query>
> 					<esql:call>{call
> rptLocationDeviations(<esql:parameter direction="in"
> type="Int"><xsp:expr>number</xsp:expr></esql:parameter>,
<esql:parameter
> direction="in"
type="String"><xsp:expr>room</xsp:expr></esql:parameter>,
> <esql:parameter direction="in"
> type="String"><xsp:expr>beginTime</xsp:expr></esql:parameter>,
> <esql:parameter direction="in"
>
type="String"><xsp:expr>endTime</xsp:expr></esql:parameter>)}</esql:call
> >
> 					<esql:call-results>
> 						<esql:use-results>
> 							<esql:result>
> 	
> <xsp:expr>(ResultSet)<esql:get-object column="1" from-call="true"/>
> 	
> </xsp:expr>
> 							</esql:result>

You should not need the <esql:use-results/> tag. Try removing the tag
and report back.

	Chris.
-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


---------------------------------------------------------------------
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