Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 23265 invoked from network); 16 Sep 2003 01:00:33 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 16 Sep 2003 01:00:33 -0000 Received: (qmail 36129 invoked by uid 500); 16 Sep 2003 01:00:02 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 36096 invoked by uid 500); 16 Sep 2003 01:00:01 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: users@cocoon.apache.org Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 36073 invoked from network); 16 Sep 2003 01:00:00 -0000 Received: from unknown (HELO aspexch1.adl.aspect.com.au) (139.130.136.221) by daedalus.apache.org with SMTP; 16 Sep 2003 01:00:00 -0000 Message-ID: <65DB394748BED211AA6700A0C9EC283203CF5B40@aspcbr-mail1.cbr.aspect.com.au> From: Dean Cording To: "'users@cocoon.apache.org'" Subject: RE: SQLTransformer not committing Inserts Date: Tue, 16 Sep 2003 10:28:06 +0930 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C37BED.970293E0" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C37BED.970293E0 Content-Type: text/plain; charset="iso-8859-1" Some more information and a work around. The XLST Transformer isn't even invoked. I can add random characters to CodeAddTest.xsl to make it an invalid XSL file and no error is produced. Interestingly if I use a DBAction (which I don't want to do) everything works as intended. The work around is to turn the pipeline being redirected to into a resource and call the resource instead of redirecting to the pipeline. Dean -----Original Message----- From: Dean Cording [mailto:Dean.Cording@kaz-group.com] Sent: Tuesday, 16 September 2003 9:23 AM To: Cocoon Users (E-mail) Subject: SQLTransformer not committing Inserts I am having some problems with SQLTransformer not commiting inserts into a database. I am running Cocoon 2.1 and MS SQLServer. My pipeline looks like: And CodeAddTest.xsl looks like: INSERT INTO Codes (CodeType, CodeValue) VALUES ('', '') The values to be inserted are generated from a form and passed in as request parameters. At the end of the pipeline it redirects to a list page that shows all of the values in the database. The problem is that the new values aren't being inserted. If I remove the redirect (and replace it with a static page for example) then the insert works fine. Any ideas? Thanks, Dean ------_=_NextPart_001_01C37BED.970293E0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Some=20 more information and a work around.
 
The=20 XLST Transformer isn't even invoked.  I can add random characters = to=20 CodeAddTest.xsl to make it an invalid XSL file and no error is = produced. =20 Interestingly if I use a DBAction (which I don't want to do) everything = works as=20 intended.
 
The=20 work around is to turn the pipeline being redirected to into a resource = and call=20 the resource instead of redirecting to the = pipeline.
 
Dean 
-----Original Message-----
From: Dean Cording=20 [mailto:Dean.Cording@kaz-group.com]
Sent: Tuesday, 16 = September 2003=20 9:23 AM
To: Cocoon Users (E-mail)
Subject: = SQLTransformer=20 not committing Inserts

I = am having some=20 problems with SQLTransformer not commiting inserts into a = database.  I am=20 running Cocoon 2.1 and MS SQLServer.
 
My = pipeline looks=20 like:
 
          &nb= sp;   =20 <map:match=20 = pattern=3D"CodeCreate-add">
      &n= bsp;           &n= bsp;=20 <map:generate=20 = type=3D"request"/>
        = ;            = ;
           &= nbsp;       =20 <map:transform type=3D"xslt"=20 = src=3D"CodeAddTest.xsl">
       = ;            = ;    =20 <map:parameter name=3D"use-request-parameters" value=3D"true"/> = =
           &n= bsp;       =20 = </map:transform>
       &nbs= p;           =20 =
           &n= bsp;       =20 <map:transform=20 = type=3D"sql">         &n= bsp;           &n= bsp;        =20 =
           &n= bsp;           =20 <map:parameter name=3D"use-connection" = value=3D"{global:db-connection}"/>=20 =
           &n= bsp;           =20 <map:parameter name=3D"show-nr-of-rows" value=3D"true"/>=20 =
           &n= bsp;           =20 <map:parameter name=3D"isupdate"=20 = value=3D"true"/>
        &= nbsp;          =20 = </map:transform>
       &nbs= p;           =20 =
           &n= bsp;       =20 <!-- Redirect back to the table display page=20 = -->
          &n= bsp;        =20 <map:redirect-to=20 = uri=3D"CodeTableList"/>       &nbs= p;           &nbs= p;
           =     =20 </map:match>
 
 
And = CodeAddTest.xsl looks like:
 
<xsl:stylesheet=20 version=3D"1.0" xmlns:xsl=3D"http://www.w3.org/1999/XSL= /Transform"=20 =
           &n= bsp;           &n= bsp;     =20 xmlns:sql=3D"http://apache.org/cocoon/SQL/2= .0">
   =20 <xsl:param name=3D"CodeType"/>
    = <xsl:param=20 name=3D"CodeValue"/>
   
   =20 <xsl:template=20 = match=3D"/">
         = ;            = ;    =20
   =20 <page>
        = <execute-query=20 xmlns=3D"http://apache.org/cocoon/SQL/2= .0">
         &n= bsp; =20 <query> =20 =
           &n= bsp;   =20 INSERT INTO Codes (CodeType,=20 = CodeValue)
         &nbs= p;     =20 VALUES ('<xsl:value-of select=3D"$CodeType"/>', = '<xsl:value-of=20 = select=3D"$CodeValue"/>')
      &nbs= p;    =20 </query>
       =20 </execute-query>
    </page> =20
   
   =20 </xsl:template>
    =
</xsl:stylesheet>=20
 
The = values to be=20 inserted are generated from a form and passed in as=20 request parameters.  At the end of the pipeline it = redirects to a=20 list page that shows all of the values in the database.  The = problem is=20 that the new values aren't being inserted.  If I remove the = redirect (and=20 replace it with a static page for example) then the insert works=20 fine.
 
 
Any = ideas?
 
 
Thanks,
 
Dean
------_=_NextPart_001_01C37BED.970293E0--