You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Per Steffensen <st...@designware.dk> on 2001/04/06 21:30:06 UTC

esql:results

Hi.

I have some xml shown below. My INSERT sql goes fine, but WHY is the <desc>Succes</desc> part not inserted in the document after esql. The <desc>Error</desc> part IS inserted when I make a mistake in the INSERT sql.

Thanx


   <esql:connection>
      <esql:pool>my_connection</esql:pool>
      <esql:execute-query>
        <esql:query>
          INSERT INTO ResDataCustomers VALUES(....)
        </esql:query>
        <esql:results>
          <esql:no-results>
            <desc>
              Succes
            </desc>
          </esql:no-results>
        </esql:results>
        <esql:error-results>
          <desc>
            Error
          </desc>
        </esql:error-results>
      </esql:execute-query>
    </esql:connection> 

Re: esql:results

Posted by JP Moresmau <jp...@dol.ie>.
<esql:results> is processed only for queries that return a result set. For
queries that perform DML operations, use <esql:update-results>.
<esql:error-results> get processed if a SQL exception gets thrown, in both
cases.
Hope this helps!

JP

At 21:30 06/04/2001 +0200, you wrote: 
>
> Hi.
>  
> I have some xml shown below. My INSERT sql goes fine, but WHY is the
> <desc>Succes</desc> part not inserted in the document after esql. The
> <desc>Error</desc> part IS inserted when I make a mistake in the INSERT sql.
>  
> Thanx
>  
>  
>    <esql:connection>
>       <esql:pool>my_connection</esql:pool>
>       <esql:execute-query>
>         <esql:query>
>           INSERT INTO ResDataCustomers VALUES(....)
>         </esql:query>
>         <esql:results>
>           <esql:no-results>
>             <desc>
>               Succes
>             </desc>
>           </esql:no-results>
>         </esql:results>
>         <esql:error-results>
>           <desc>
>             Error
>           </desc>
>         </esql:error-results>
>       </esql:execute-query>
>     </esql:connection> 




JP Moresmau
http://frenchstud.io

---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>