You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "von Schwerdtner, Thomas (GXS, FPI)" <Th...@gxs.ge.com> on 2002/05/05 00:50:30 UTC

[esql] Nesting after INSERT (result or no-result)?

I'm doing something wrong here but I cannot find answers in the mailing list
or in the docs.  I simply want to run a SELECT after an INSERT has
completed, but neither <esql:resutls> or <esql:no-results> seem to get
triggered.

Referencing the following, the INSERT statement suceeds just fine, but I get
nothing from either "results" or "no-results".

I'd be thrilled with a RTFM response so long as it is accompanied by some
type of pointing gesture indicating the direction in which I should clumsily
wander.

TIA,
-Tom

(cocoon 2.0.2 and postgresql 7.2 on jdk 1.3)

============================================
<?xml version="1.0" encoding="ISO-8859-1"?>

<xsp:page language="java"
	xmlns:xsp="http://apache.org/xsp"
	xmlns:xsp-request="http://apache.org/xsp/request/2.0"
	xmlns:esql="http://apache.org/cocoon/SQL/v2">

	<page>
		<title>Vendor Database</title>
		<content>
			<esql:connection>
				<esql:pool>gesupply</esql:pool>

				<esql:execute-query>
					<esql:query>
						INSERT INTO 
							region (region_name,
region_no)
						VALUES 
	
('<xsp-request:get-parameter name="region"/>', 
	
<xsp-request:get-parameter name="region_no"/>)
					</esql:query>
					<esql:results>
						<esql:row-results>
							<table><tr><td>
	
Results found for insert query
							</td></tr></table>
						</esql:row-results>
					</esql:results>
					<esql:no-results>
						<table><tr><td>
									NO
results found for insert query
						</td></tr></table>
					</esql:no-results>
				</esql:execute-query>

			</esql:connection>

		</content>
	</page>
</xsp:page>
============================================

Re: [esql] Nesting after INSERT (result or no-result)?

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 04.May.2002 -- 06:50 PM, von Schwerdtner, Thomas (GXS, FPI) wrote:
> I'm doing something wrong here but I cannot find answers in the mailing list
> or in the docs.  I simply want to run a SELECT after an INSERT has
> completed, but neither <esql:resutls> or <esql:no-results> seem to get
> triggered.
> 
> Referencing the following, the INSERT statement suceeds just fine, but I get
> nothing from either "results" or "no-results".

Try <esql:update-results/> for successful and <esql:no-results/> for unsuccessful
inserts.

BTW I prefer actions for data manipulation and esql for queries.

	Chris.

-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

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