Gustavo,

try this:

<esql:query>select * from employee where empno=
  <esql:parameter>MY_VARIABLE</esql:parameter>
</esql:query>

You may need to specify a type, such as <esql:parameter type="int">,
otherwise it will assume a String.

-Christopher



Thanks,

I chanche my code to:
<?xml version="1.0"?>

<?cocoon-process type="xsp"?>
<xsp:page
  xmlns:xsp="http://www.apache.org/1999/XSP/Core";
  xmlns:esql="http://apache.org/cocoon/SQL/v2";
>

<page>
<esql:connection>
  <esql:driver>oracle.jdbc.driver.OracleDriver</esql:driver>
  <esql:dburl>jdbc:oracle:thin:@MyIP:MyPort:cta</esql:dburl>
  <esql:username>UserID</esql:username>
  <esql:password>Password</esql:password>
  <esql:execute-query>
    <esql:query>select * from employee</esql:query>
    <esql:results>
      <header>header info</header>
      <esql:row-results>
        <empleado>
          <empno><esql:get-string column="empno"/></empno>
          <lastname><esql:get-string column="lastname"/></lastname>
         </empleado >
      </esql:row-results>
      <footer>footer info</footer>
    </esql:results>
  </esql:execute-query>
</esql:connection>
</page>
</xsp:page>

And now It works, but now what I wanto to do i to make variable the
criteria of
my query, yes, something like

<esql:query>select * from employee where empno=MY_VARIABLE</esql:query>

Do you know how can I do that ?

Thanks a lot !!

Gustavo







---------------------------------------------------------------------
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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to