cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "julien bloit" <Julien.Bl...@ircam.fr>
Subject Re: [xsp-action] switch upon esql delete
Date Mon, 26 Apr 2004 16:56:08 GMT
Thank you!

 It works like this :

<esql:connection>
   <esql:pool>dvdadmin</esql:pool>
   <esql:execute-query>
    <esql:query>DELETE FROM valeurs_categories WHERE valeur_id =
<xsp:expr>categorie_id</xsp:expr>
    </esql:query>
    <esql:update-results><action:set-success/></esql:update-results>
    <esql:error-results><action:set-failure/></esql:error-results>
   </esql:execute-query>
  </esql:connection>

Julien

----- Original Message ----- 
From: "Christopher Painter-Wakefield" <paint007@mc.duke.edu>
To: <users@cocoon.apache.org>
Sent: Monday, April 26, 2004 6:30 PM
Subject: Re: [xsp-action] switch upon esql delete


>
>
>
>
> Try <esql:update-results> and <esq;get-update-count>.  They aren't really
> documented well on the Cocoon website, and I haven't used them much
myself,
> but in theory you should get an update-results instead of a results when
> you do an update or delete.  If your database and jdbc drivers support it,
> I think you should be able to get the number of rows deleted using the
> get-update-count inside of udpate-results.
>
> -Christopher
>
>
>
> |---------+---------------------------->
> |         |           "julien bloit"   |
> |         |           <Julien.Bloit@irc|
> |         |           am.fr>           |
> |         |                            |
> |         |           04/26/2004 09:46 |
> |         |           AM               |
> |         |           Please respond to|
> |         |           users            |
> |         |                            |
> |---------+---------------------------->
>
>---------------------------------------------------------------------------
-----------------------------------|
>   |
|
>   |       To:       <users@cocoon.apache.org>
|
>   |       cc:
                                    |
>   |       Subject:  [xsp-action] switch upon esql delete
|
>
>---------------------------------------------------------------------------
-----------------------------------|
>
>
>
>
> Hi,
>
> In an xsp-action, I want to delete a table row, and depending on the
result
> of the delete, switch to one or another redirection.
>
> This would be the basic structure of my delete query :
>
> <esql:connection>
>    <esql:pool>dvdadmin</esql:pool>
>    <esql:execute-query>
>     <esql:query>DELETE FROM valeurs_categories WHERE valeur_id =
> <xsp:expr>cat_id</xsp:expr></esql:query>
>     <esql:results><action:set-success/><esql:results>
>     <esql:error-results><action:set-failure/><esql:error-results>
>    </esql:execute-query>
>  </esql:connection>
>
> The problem is the <esql:results> tag is empty for a delete query, so I
> can't set the action to success.
> Doses anybody know how I could get the successful delete message with esql
> ?
>
> Thanks,
> Julien
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>


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


Mime
View raw message