You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Nicky Feldman <ni...@yahoo.com> on 2000/11/14 16:36:33 UTC

esql taglib: 2nd query results won't show up

Hi,
I have just begun to cocoon and am trying to reproduce
the esql taglib example from the sql samples. I didn't
change ANYTHING in 'samples/esql.xml' except db info
and queries; however, while the first query results
show up as a string, there are no signs of the 2nd
query results. What am I doing wrong? Thanks a lot for
your patience with a novice.
esql.xml code:
<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<?xml-logicsheet
href="resource://org/apache/cocoon/processor/xsp/library/sql/esql.xsl"?>
<xsp:page language="java" 
xmlns:esql="http://apache.org/cocoon/SQL/v2"
xmlns:xsp="http://www.apache.org/1999/XSP/Core">
	<page>
		<esql:execute-query>
		
<esql:driver>sun.jdbc.odbc.JdbcOdbcDriver</esql:driver>
		
<esql:dburl>jdbc:odbc:orcl.test.star.com</esql:dburl>
			<esql:username>uid</esql:username>
			<esql:password>pwd</esql:password>
			<esql:query>Select id from customer</esql:query>
				<esql:results>
					<customer>
						<esql:get-string column="id"/>
						<esql:execute-query>
							<esql:query>Select circuit_type from circuit
where upper(circuit.customer_id)=
upper('<esql:get-string column="id" ancestor="1"/>')
group by circuit_type </esql:query>
							<esql:results>
								<circuit>
									<esql:get-string column="circuit_type"/>
								</circuit>
							</esql:results>
						</esql:execute-query>
					</customer>
				</esql:results>
			<esql:no-results>
				<error>no results were found</error>
			</esql:no-results>
			<esql:error-results>
				<message>
					<esql:get-message/>
				</message>
				<stacktrace>
					<esql:get-stacktrace/>
				</stacktrace>
			</esql:error-results>
		</esql:execute-query>
	</page>
</xsp:page>

__________________________________________________
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/

Re: esql taglib: 2nd query results won't show up

Posted by ma...@home.se.
I'm not sure that this is of any help, but a  few weeks back there was a
thread regarding some jdbc drivers that didn't support multiple gets of
the result values.

What happens if you try to fetch the value id value twice in the first
<esql:results>?

Looking at the name of the dburl I would guess that you are running an
oracle database? If that is the case why don't you use the oracle jdbc
drivers instead?

Hope that this might help

/Magnus

-- 
Magnus Egnerfors	
Email: magnus.egnerfors@home.se

On Tue, 14 Nov 2000, Nicky Feldman wrote:

> Date: Tue, 14 Nov 2000 07:36:33 -0800 (PST)
> From: Nicky Feldman <ni...@yahoo.com>
> Reply-To: cocoon-users@xml.apache.org
> To: cocoon-users@xml.apache.org
> Subject: esql taglib: 2nd query results won't show up
> 
> Hi,
> I have just begun to cocoon and am trying to reproduce
> the esql taglib example from the sql samples. I didn't
> change ANYTHING in 'samples/esql.xml' except db info
> and queries; however, while the first query results
> show up as a string, there are no signs of the 2nd
> query results. What am I doing wrong? Thanks a lot for
> your patience with a novice.
> esql.xml code:
> <?xml version="1.0"?>
> <?cocoon-process type="xsp"?>
> <?xml-logicsheet
> href="resource://org/apache/cocoon/processor/xsp/library/sql/esql.xsl"?>
> <xsp:page language="java" 
> xmlns:esql="http://apache.org/cocoon/SQL/v2"
> xmlns:xsp="http://www.apache.org/1999/XSP/Core">
> 	<page>
> 		<esql:execute-query>
> 		
> <esql:driver>sun.jdbc.odbc.JdbcOdbcDriver</esql:driver>
> 		
> <esql:dburl>jdbc:odbc:orcl.test.star.com</esql:dburl>
> 			<esql:username>uid</esql:username>
> 			<esql:password>pwd</esql:password>
> 			<esql:query>Select id from customer</esql:query>
> 				<esql:results>
> 					<customer>
> 						<esql:get-string column="id"/>
> 						<esql:execute-query>
> 							<esql:query>Select circuit_type from circuit
> where upper(circuit.customer_id)=
> upper('<esql:get-string column="id" ancestor="1"/>')
> group by circuit_type </esql:query>
> 							<esql:results>
> 								<circuit>
> 									<esql:get-string column="circuit_type"/>
> 								</circuit>
> 							</esql:results>
> 						</esql:execute-query>
> 					</customer>
> 				</esql:results>
> 			<esql:no-results>
> 				<error>no results were found</error>
> 			</esql:no-results>
> 			<esql:error-results>
> 				<message>
> 					<esql:get-message/>
> 				</message>
> 				<stacktrace>
> 					<esql:get-stacktrace/>
> 				</stacktrace>
> 			</esql:error-results>
> 		</esql:execute-query>
> 	</page>
> </xsp:page>
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Calendar - Get organized for the holidays!
> http://calendar.yahoo.com/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 
> 
> 


Re: esql taglib: 2nd query results won't show up

Posted by Donald Ball <ba...@webslingerZ.com>.
On Tue, 14 Nov 2000, Nicky Feldman wrote:

> Hi,
> I have just begun to cocoon and am trying to reproduce
> the esql taglib example from the sql samples. I didn't
> change ANYTHING in 'samples/esql.xml' except db info
> and queries; however, while the first query results
> show up as a string, there are no signs of the 2nd
> query results. What am I doing wrong? Thanks a lot for
> your patience with a novice.

i'm not sure what's going wrong here. i suggest you update to the latest
version of the logicsheet from cvs and try again. you'll have to reformat
your xsp page to the new schema (look in the sql samples directory for
example); i think that's the last schema change for a while though. :)

oh, and i note that you're using the jdbc/odbc bridge, probably with
access. your life is in your own hands, that driver has lots of issues.

- donald