cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From michael.raffenb...@t-online.de (Michael Raffenberg)
Subject AW: No results from a stored procedure
Date Thu, 19 Jun 2003 23:19:18 GMT
Hi, 

try it with <esql:call>
Here is a fast example:


		<esql:execute-query>
			<esql:call>{call pip2a9.HiQuery ('', '', '',
'583911','<xsp:expr>class_id</xsp:expr>','true','<xsp:expr>sl</xsp:expr>',
	
'','<xsp:expr>pl</xsp:expr>','<xsp:expr>ps</xsp:expr>',<esql:parameter
direction="out" type="String"/>)}
			</esql:call>
			<esql:call-results>
			<response>
			<esql:execute-query>
				<esql:query>
				  <esql:get-string ancestor="1"
from-call="true" column="1"/>
				</esql:query>		
				<esql:skip-rows><xsl:value-of
select="$skiprows"/></esql:skip-rows>
			  <esql:max-rows><xsl:value-of
select="$maxrows"/></esql:max-rows>
				<esql:results>
				<status><s.success/></status>
					<part.info>
				    <esql:row-results>
						  <element>
					      <esql:get-columns/>
							</element>
					  </esql:row-results>
					</part.info>
				</esql:results>
				<esql:no-results>
					<status><s.nomatch/></status>
				</esql:no-results>
			</esql:execute-query>
			</response>
			</esql:call-results>
			<esql:error-results>
        <message><esql:get-message/></message>
        <stacktrace><esql:get-stacktrace/></stacktrace>
      </esql:error-results>
    </esql:execute-query>

Hope that can help.
--Michael


> 
> 
> Here is the code from the page:
> <?xml version="1.0" encoding="UTF-8"?>
> <xsp:page language="java" xmlns:xsp="http://apache.org/xsp" 
> xmlns:xsp-request="http://apache.org/xsp/request/2.0"
> xmlns:esql="http://apache.org/cocoon/SQL/v2"
> xmlns:xsp-session="http://apache.org/xsp/session/2.0"
> create-session="true">
> <page>
> <xsp:logic>
> 	String beginTime ="5-20-2003";
> 	String endTime = "6-20-2003";
> 	String room = "Rm 130 B";
> 	String qry = "rptLocationDeviationsgetTasks 'Rm 130
> B','5-20-2003','6-20-2003'";
> </xsp:logic>
> 	<title>Room Report for <xsp:expr>room</xsp:expr>
> 	<xsp:expr>beginTime</xsp:expr> to 
> <xsp:expr>endTime</xsp:expr></title>
> 	<content>
> 		<esql:connection>
> 			<esql:pool>vyzo</esql:pool>
> 			<esql:execute-query>
> 				<esql:query>
> 				execute 
> rptLocationDeviationsgetTasks 
> '<xsp:expr>room</xsp:expr>','<xsp:expr>beginTime</xsp:expr>','
> <xsp:expr>
> endTime</xsp:expr>'
> 				</esql:query>
> 					<esql:results>
> 						<tasks>
> 	
> <esql:row-results>
> 								<task>
> 	
> <name>
> 	
> <esql:get-string column="2"/>
> 	
> </name>
> 								</task>
> 	
> </esql:row-results>
> 						</tasks>
> 					</esql:results>
> 				</esql:execute-query>
> 			
> 				<esql:execute-query>
> 					<esql:query>
> 					execute 
> rptLocationDeviations 
> '<xsp:expr>room</xsp:expr>','<xsp:expr>beginTime</xsp:expr>','
> <xsp:expr>
> endTime</xsp:expr>'
> 					</esql:query>
> 					<esql:results>
> 						<task-date>
> 	
> <esql:row-results>
> 								<task>
> 	
> <task-name>
> 	
> <esql:get-string column="2"/>
> 	
> </task-name>
> 								</task>
> 	
> </esql:row-results>
> 						</task-date>
> 					</esql:results>
> 				</esql:execute-query>
> 			</esql:connection>
> 		</content>
> 	</page>
> </xsp:page>
> 
> and this is the output that I am getting:
> 
> <?xml version="1.0" encoding="UTF-8" ?> 
> - <page xmlns:xsp-session="http://apache.org/xsp/session/2.0"
> xmlns:xsp="http://apache.org/xsp" 
> xmlns:xspdoc="http://apache.org/cocoon/XSPDoc/v1"
> xmlns:esql="http://apache.org/cocoon/SQL/v2"
> xmlns:xsp-request="http://apache.org/xsp/request/2.0">
>   <title>Room Report for Rm 130 B 5-20-2003 to 6-20-2003</title> 
> - <content>
> - <tasks>
> - <task>
>   <name>Change Bottles</name> 
>   </task>
> - <task>
>   <name>Check Room</name> 
>   </task>
> - <task>
>   <name>Special Feed</name> 
>   </task>
> - <task>
>   <name>Special Water</name> 
>   </task>
> - <task>
>   <name>Cages/Feed/H20/Mop</name> 
>   </task>
>   </tasks>
>   </content>
>   </page>
> 
> Tim Bachta
>  
>  
> 
> -----Original Message-----
> From: Tim Bachta 
> Sent: Thursday, June 19, 2003 11:57 AM
> To: cocoon-users@xml.apache.org
> Subject: No results from a stored procedure
> 
> Is there a reason why cocoon would not execute a certain 
> stored procedure?  I have one that I have verified returns a 
> result set but when I run it in cocoon I am not getting 
> anything back.  It looks like it is skipping over the section 
> completely.
> 
>  
> 
> Tim Bachta
> 
>  
> 
>  
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 


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