cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aurélien DEHAY ...@zorel.org>
Subject Re: what does xsp page returns when inserting into database using esql
Date Fri, 10 Dec 2004 23:03:39 GMT
Reuben Christie wrote:
> Hi i am learning xsp to do databse transactions. right now i m testing with
> insert into database.I am using esql logic sheet.now the question is How do
> i return an xml tag with just value 'true' when the insertion is
> succesful..currently the xsp doent return anything.the only thing i get back
> is following
> <?xml version="1.0" encoding="ISO-8859-1" ?>
>   <record-set xmlns:xsp="http://apache.org/xsp"
> xmlns:xspdoc="http://apache.org/cocoon/XSPDoc/v1"
> xmlns:esql="http://apache.org/cocoon/SQL/v2"
> xmlns:xsp-request="http://apache.org/xsp/request/2.0" />
> 
> 
> but i want to add a tag like <result>succes</result>
> 
> sounds simple and stupid but i just dont know how to do it
> 

Something like this:

       <esql:execute-query>
        <esql:query>here your insert</esql:query>
         <esql:error-results>
           <result>
             error
           </result>
         </esql:error-results>
         <esql:update-results>
           <result>
             <esql:get-update-count/> rows added
           </result>
         </esql:update-results>
       </esql:execute-query>

Rgds.
-- 
Aurélien

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


Mime
View raw message