cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: cannot get ESQL to work... urgent
Date Thu, 14 Sep 2000 16:54:44 GMT
On Thu, 14 Sep 2000, Saif Khaja wrote:

> I tried this but it doesnt work.
> 
> 	<xsp:logic>
> 	String sid = request.getParameter("pubid");
> 
> <esql:execute-query>
> <esql:driver>com.inet.tds.TdsDriver</esql:driver>
> <esql:dburl>jdbc:inetdae6:obie?database=pubs</esql:dburl>
> <esql:username>sa</esql:username>
> <esql:password></esql:password>
> <esql:query>
> 	select * from publishers
> 	where pub_id='<xsp:expr>sid</xsp:expr>'
> </esql:query>
> <esql:results>
> <publisher>
> <id><esql:get-string column="pub_id"/></id>
> <name><esql:get-string column="pub_name"/></name>
> </publisher>
> </esql:results>
> <esql:no-results>
> <error>no results were found</error>
> </esql:no-results>
> </esql:execute-query>
> 
> 	</xsp:logic>

should be 

<esql:execute-query>
 ...
 <esql:query>
	select * from publishers
 	where pub_id='<xsp:expr>request.getParameter("pubid")</xsp:expr>'
 </esql:query>
</esql:execute-query>

or even better, declare the request namespace and use:

<esql:execute-query>
 ...
 <esql:query>
	select * from publishers
 	where pub_id='<request:get-parameter name="pubid"/>'
 </esql:query>
</esql:execute-query>

- donald


Mime
View raw message