Luís, Torsten,

Has this been fixed? If not please create a Bug at http://nagoya.apache.org/bugzilla 
and we can
track it.

Thanks,
dims


--- Luís Góis <[EMAIL PROTECTED]> wrote:
> Hello again Torsten,
> 
> if my query didn't return any row, a call to the execute() method
> returns false, right?
> Therefore, for a no-results situation, the code resulting from the
> application
> of the esql:no-results template is never reached -  this is what I
> understand from reading
> the java code below. Am I right?! I guess it's highly probable that I'm
> grossly wrong,
> but this is the only place in the esql.xsl file where the template is
> apllied.
> 
> I don't wan't to execute java code when I do an update or insert, but
> when my
> "SELECT title FROM test WHERE title = 'a title' " query returns no rows
> - for this 3
> situations, the execute() method's will return false and not a ResultSet
> Object.
> 
> What am I missing?!?!?
> 
> Conclusion : I need mutual exclusivity between 'no-results' and
> 'update-results' (mutual
> exclusivity between 'no-results' and 'results' is assured by the
> true/false return values of the
> execute() method).
> 
> Thanks for your attention. I really must solve this (i could just edit
> esql.xsl to "correct"
> this, but I wan't to really make sure this is what I have to do).
> 
> 
> esql taglib v1.86
> =================
> <<line 503>>
>       if (_esql_query.results) {
>         do {
>           _esql_query.resultset = _esql_query.statement.getResultSet();
>           _esql_query.resultset_metadata =
> _esql_query.resultset.getMetaData();
>           _esql_query.position = 0;
>           if (_esql_connection.use_limit_clause == 0 &amp;&amp;
> _esql_query.skip_rows &gt; 0) {
>             while (_esql_query.resultset.next()) {
>               _esql_query.position++;
>               if (_esql_query.position == _esql_query.skip_rows) {
>                 break;
>               }
>             }
>           }
> 
>           if (_esql_query.resultset.next()) {
>             <xsl:apply-templates select="esql:results"/>
>           }
>           else {
>             <xsl:apply-templates select="esql:no-results"/>
>           }
> 
>           _esql_query.resultset.close();
>         } while(_esql_query.statement.getMoreResults());
>       } else {
>         _esql_query.position = _esql_query.statement.getUpdateCount();
>         if (_esql_query.position &gt;= 0) {
>           <xsl:apply-templates select="esql:update-results/*"/>
>         }
>       }
> 
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
> 


=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to