cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Drasko Kokic <drasko_ko...@yahoo.com>
Subject Re: [C1.8.1-dev] ESQL: problems with UPDATE !!!
Date Fri, 01 Dec 2000 18:04:18 GMT
Sorry for repost ... the previous post had a small
error:

I am just wondering if anybody could give me some
sample code for the UPDATE in ESQL.

The following code:


  <UPDATE-CODES>
    <esql:execute-query inner-method="no">
      <esql:query>
        update CODES
        set MSISDN='<xsp:expr>n</xsp:expr>',
TIMESTAMP=SYSDATE
        where CODE='<xsp:expr>c</xsp:expr>' and
MSISDN=NULL
      </esql:query>
      <esql:update-results>
        <esql:row-results>
          <FLASH>regCode=1</FLASH>
        </esql:row-results>
        <esql:no-results>
          <MESSAGE>no results were found</MESSAGE>
        </esql:no-results>
      </esql:update-results>
      <esql:error-results>
        <MESSAGE><esql:get-message/></MESSAGE>
       
<STACKTRACE><esql:get-stacktrace/></STACKTRACE>
        <FLASH>regCode=0</FLASH>
        <FLASH>codecheck=0</FLASH>
        <xsp:logic>
          servletContext.log("&lt;regCode
position='updateing CODES' db-error='" +
<esql:get-message/> +"'/&gt;");
        </xsp:logic>
      </esql:error-results>
    </esql:execute-query>
  </UPDATE-CODES>

.. is producing thie following output:

<UPDATE-CODES>
          <esql:row-results>
               <SOMETHING/>
               <FLASH>
                    regCode=1
               </FLASH>
          </esql:row-results>
          <MESSAGE>
               no results were found
          </MESSAGE>
     </UPDATE-CODES>

... and I am not sure if all neccessary elements are
being specified?!

What is the correct syntaxt (schema) for the UPDATE
type ESQL?

TIA
Drasko


__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

Mime
View raw message