You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ma...@swisscom.com on 2003/04/10 14:30:57 UTC

ESQL: "execute-query" ignored by cocoon!!!

I don't know why, but in all my pages, all the following queries are
simply ignored!!!! Cocoon just jump over it! in SQL Profiler I see all
queries, like "select * from Status", "select * from Groups", but not
following! Is it maybe because of a conflict with the session variable
"user"? 

	 <esql:execute-query>
		<esql:query>
			select ur_name from Users
	    </esql:query>
		<esql:results>
		  <esql:row-results>
			<option><esql:get-string
column="ur_name"/></option>
		  </esql:row-results>
		</esql:results>
	  </esql:execute-query>		

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: ESQL: "execute-query" ignored by cocoon!!!

Posted by Yves Vindevogel <yv...@implements.be>.
And you need to create a root element where your data is put in ....
And don't forget to mention the connection pool either.

Something like this

<?xml version="1.0" encoding="ISO-8859-1"?>

    <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>
			<esql:query>
				select * from tblLogin
                                	where name = '<xsp-request:get-parameter 
name="username"/>'
                                 	and password = '<xsp-request:get-parameter 
name="password"/>' ;
			</esql:query>

                    <esql:results>
				:-))
                    </esql:results>

		    <esql:no-results>
		            	<head>
            			</head>

				<body>
					;-((
				</body>
		    </esql:no-results>
                </esql:execute-query>

            </esql:connection>
	</html>
    </xsp:page>


> On czw, kwi 10, 2003 at 02:30:57 +0200, Maxime.Gheysen@swisscom.com wrote:
> > I don't know why, but in all my pages, all the following queries are
> > simply ignored!!!! Cocoon just jump over it! in SQL Profiler I see all
> > queries, like "select * from Status", "select * from Groups", but not
> > following! Is it maybe because of a conflict with the session variable
> > "user"?
> >
> > 	 <esql:execute-query>
> > 		<esql:query>
> > 			select ur_name from Users
> > 	    </esql:query>
> > 		<esql:results>
> > 		  <esql:row-results>
> > 			<option><esql:get-string
> > column="ur_name"/></option>
> > 		  </esql:row-results>
> > 		</esql:results>
> > 	  </esql:execute-query>
>
> Is the piece of code you provided enclosed with <esql:connection> tag ?
> 	ouzo

-- 
Met vriendelijke groeten,
Kind regards,
Bien à vous,

Yves Vindevogel

Implements
Kempische Steenweg 206  --  3500 Hasselt  --  Belgium
Phone/Fax: +32 (11) 43.55.76  --  Mobile: +32 (478) 80.82.91
Mail: yves.vindevogel@implements.be  --  www.implements.be

Quote: The winner never says participating is more important than winning.

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: ESQL: "execute-query" ignored by cocoon!!!

Posted by Leszek Gawron <ou...@vip.net.pl>.
On czw, kwi 10, 2003 at 02:30:57 +0200, Maxime.Gheysen@swisscom.com wrote:
> I don't know why, but in all my pages, all the following queries are
> simply ignored!!!! Cocoon just jump over it! in SQL Profiler I see all
> queries, like "select * from Status", "select * from Groups", but not
> following! Is it maybe because of a conflict with the session variable
> "user"? 
> 
> 	 <esql:execute-query>
> 		<esql:query>
> 			select ur_name from Users
> 	    </esql:query>
> 		<esql:results>
> 		  <esql:row-results>
> 			<option><esql:get-string
> column="ur_name"/></option>
> 		  </esql:row-results>
> 		</esql:results>
> 	  </esql:execute-query>		
Is the piece of code you provided enclosed with <esql:connection> tag ?
	ouzo
-- 
            __
         | /  \ |        Leszek Gawron            //  \\
        \_\\  //_/      ouzo@vip.net.pl          _\\()//_
         .'/()\'.     Phone: +48(600)341118     / //  \\ \
          \\  //  recursive: adj; see recursive  | \__/ |


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org