cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <h...@dvs1.informatik.tu-darmstadt.de>
Subject Re: esql:query problem
Date Wed, 25 Jun 2003 15:20:15 GMT
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


Mime
View raw message