You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Reuben Christie <rc...@decisiontech.com> on 2004/12/10 23:56:21 UTC
what does xsp page returns when inserting into database using esql
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
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: what does xsp page returns when inserting into database using
esql
Posted by Aurélien DEHAY <ad...@zorel.org>.
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