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: jdbc or xsp or esql problem
Date Thu, 21 Mar 2002 08:54:13 GMT
On 20.Mar.2002 -- 01:21 PM, von Schwerdtner, Thomas (GXS, FPI) wrote:
> test.xsp contains:
> ========================================================================
> <xsp:page 
> 	xmlns:xsp="http://apache.org/xsp" 
> 	xmlns:xlink="http://www.w3.org/1999/xlink" 
> 	xmlns:esql="http://apache.org/cocoon/SQL/v2" 
> 	language="java">
> 	
> 	<esql:connection>
> 		<esql:pool>gesupply</esql:pool>
> 		<esql:execute-query>
> 			<esql:query>SELECT
> Id,SupportClassId,Type,Description FROM supporttype<esql:results>
> 					<table>
> 						<esql:row-results>
> 							<tr>
> 								<td>
> 	
> <esql:get-string column="Id"/></td><td>
> 	
> <esql:get-string column="Type"/></td>
> 							</tr>
> 						</esql:row-results>
> 					</table>
> 				</esql:results>
> 				<esql:no-results>
> 					<p>Sorry, no results!</p>
> 				</esql:no-results>
> 			</esql:query>
> 		</esql:execute-query>
> 	</esql:connection>
> </xsp:page>

This is wrong esql syntax. You need to end your query tag at the end
of the query, it does not span the results.

Try
 	<esql:connection>
 		<esql:pool>gesupply</esql:pool>
 		<esql:execute-query>
 			<esql:query>SELECT Id,SupportClassId,Type,Description FROM supporttype</esql:query>
            <esql:results>
 				<table>
 					<esql:row-results>
 						<tr>
 							<td><esql:get-string column="Id"/></td>
							<td><esql:get-string column="Type"/></td>
 						</tr>
 					</esql:row-results>
 				</table>
 			</esql:results>
 			<esql:no-results>
 				<p>Sorry, no results!</p>
 			</esql:no-results>
 		</esql:execute-query>
 	</esql:connection>


	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

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