cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dickson Tam" <dicks...@uclink.berkeley.edu>
Subject Re: [xsp-action] switch upon esql delete
Date Tue, 27 Apr 2004 01:41:47 GMT
Code snippet for action queries:
<esql:execute-query>
	<esql:query><jpath:value-of select="query"/></esql:query>				
	<esql:error-results>
		<result type="FAIL"/>
	</esql:error-results>
	<esql:update-results>
		<result type="SUCCESS"/>
	</esql:update-results>

   	<esql:no-results>
   		<result type="SUCCESS"/>	
   	</esql:no-results>
</esql:execute-query>

You could try these alternative tags to see if they work. In general the tags you are using
are
for SELECT queries. These are alternative tags you can use for action.

On Mon, 26 Apr 2004 15:46:29 +0200
  "julien bloit" <Julien.Bloit@ircam.fr> wrote:
>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