cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bert Van Kets <b...@vankets.com>
Subject Re: ESQL Update problem
Date Thu, 16 May 2002 09:01:18 GMT
I am using ESQL update and delete queries
Here's a snip of the code I'm using successfully:

       <esql:execute-query>
         <esql:query><xsp:expr>preQuery + " " + 
postQuery</xsp:expr></esql:query>
         <esql:results/>
       </esql:execute-query>

preQuery and portQuery are built up in the xsp and concatenate into the 
complete query.  The <esql:results> tag is empty in an update and delete 
query (sadly enough) so anything between the start and closing 
<esql:results> tag is ignored.
Bert

At 09:04 16/05/2002 +0200, you wrote:
>----- Original Message -----
>From: <sxk99c@Cs.Nott.AC.UK>
>To: <cocoon-users@xml.apache.org>
>Sent: Sunday, May 05, 2002 5:09 PM
>Subject: ESQL Update problem
>
>
> > I have been developing an application for a few months now and up till
> > now I haven't need to use the SQL UPDATE command, but when I added the
> > code below to a logicsheet today...
> >
> > <esql:execute-query>
> >   <esql:query>UPDATE item set number='<xsp:expr>base.<xsl:value-of
> > select="@type"/></xsp:expr>' where tech_id='<xsp:expr>tech</xsp:expr>'
> > and player_id='<xsp:expr>player</xsp:expr>'</esql:query>
> >   <esql:results>
> >    <esql:row-results>
> >     <update>update complete</update>
> >    </esql:row-results>
> >   </esql:results>
> >  </esql:execute-query>
> >
> > Cocoon seems to ignore the code? I don't think it is a cacheing problem
> > as I emptied the work folder and re-tried it. It just appears to ignore
> > the code. Can anyone help?
> >
>
>maybe you have to wrap the execute query tag inside:
>
>     <esql:connection>
>      <esql:pool>personnel</esql:pool>
>      <esql:autocommit>false</esql:autocommit>
>         ....
>     <esql:connection>
>.
>
>hope this helps.
>
>pino
>
> > Sharat Koya
> > WinXP, MySQL 3.23, cocoon 2.02, Java 1.3
> >
> >
> > ---------------------------------------------------------------------
> > 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: <cocoon-users-unsubscribe@xml.apache.org>
> > For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
> >
> >
>
>
>---------------------------------------------------------------------
>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: <cocoon-users-unsubscribe@xml.apache.org>
>For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


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


Mime
View raw message