Hi, I had tried this: <xsp:page language="java" xmlns:xsp="http://apache.org/xsp" xmlns:esql="http://apache.org/cocoon/SQL/v2" xmlns:xsp-request="http://apache.org/xsp/request/2.0" xmlns:xsp-session="http://apache.org/xsp/session/2.0" create-session="true">
<html> <esql:connection> <esql:pool>pierrefabre</esql:pool> <esql:execute-query> <xsp:logic> String myQuery = "select * from vwProducts" ; </xsp:logic> <esql:query> <xsp:expr>myQuery</xsp:expr> </esql:query> And this didn't work !! I says: variable myQuery not found in class ..... When I do this, it works : Guess the first part of the problem already got me on the wrong way .... <xsp:page language="java" xmlns:xsp="http://apache.org/xsp" xmlns:esql="http://apache.org/cocoon/SQL/v2" xmlns:xsp-request="http://apache.org/xsp/request/2.0" xmlns:xsp-session="http://apache.org/xsp/session/2.0" create-session="true"> <xsp:logic> String myQuery = "select * from vwProducts" ; </xsp:logic> <html> <esql:connection> <esql:pool>pierrefabre</esql:pool> <esql:execute-query> <esql:query> <xsp:expr>myQuery</xsp:expr> </esql:query> NOW: When I do this: <xsp:logic> String myQuery; myQuery = "select * from vwProducts" ; </xsp:logic> It still gives me "class myQuery not found in class ....." It only works when I immediatly assign it (String s = "jkml";) I can't do anything on the string afterwards ... How is that possible ?? > Yves - > > Why not build your select statement as a string variable inside an > <xsp:logic> block after the root user tag, and then reference it thusly: > > <esql:query> > <xsp:expr>myQuery</xsp:expr> > </esql:query> > > I do this all the time and it works perfectly. > > Regards, > > Lajos -- Kind regards, Yves Vindevogel Implements Kortrijkstraat 2 bus 1 -- 9700 Oudenaarde -- Belgium Phone/Fax: +32 (55) 45.74.73 -- Mobile: +32 (478) 80.82.91 Mail: [EMAIL PROTECTED] -- www.implements.be Quote: The winner never says participating is more important than winning. --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>