[Zope] error on dtml method, insert on postgres

Alvaro Jesus Hernandez Arteaga alhernan at uc.edu.ve
Wed Oct 15 09:51:36 EDT 2003


Hi folk

When try to insert on a postgres table show me the follow error

Zope Error

Zope has encountered an error while publishing this resource.

Error Type: _pg.error
Error Value: ERROR: parser: parse error at or near "p" at character 137

<dtml-method>
  <dtml-var std_header>
   <h2>Datos del equipo</h2>
    <p>
    <form action="equipoAddDisplay" method="post">
      <input type="hidden" name="vidtipo" value="2">
      <input type="hidden" name="vidsubzona" value="6">
      <input type="hidden" name="vidmarca" value="2">
      <input type="hidden" name="vserial" value="A2345X">
      <input type="hidden" name="vserialuc" value="UC2003">
      <input type="hidden" name="vidproveedor" value="2">
      <input type="hidden" name="vprecio" value="3500000">
      <input type="hidden" name="vfechacompra" value=20031012>
      <input type="hidden" name="vdescripcion" value="BORRAR">
      <br>
      <input type="submit" value="submit">
    </form>
 <dtml-var std_footer>
</dtml-method>

the error occurs with the field vfechacompra, fechacompra is a date field on 
postgres table.

when test my sql-method on ZMI all is OK, but not with the dtml-method

<sql-method>
 <arguments>
   vidtipo
   vidsubzona
   vidmarca
   vserial
   vserialuc
   vidproveedor
   vprecio
   vfechacompra
   vdescripcion
 </arguments>

insert into equipo 
                  (idtipo,
                   idubicacion,
                   idmarca,
                   serial,
                   serialuc,
                   idproveedor,
                   precio,
                   fechacompra,
                   descripcion) 
      values (<dtml-sqlvar vidtipo type="int">,
                   <dtml-sqlvar vidsubzona type="int">,
                   <dtml-sqlvar vidmarca type="int">,
                   <dtml-sqlvar vserial type="string">,
                   <dtml-sqlvar vserialuc type="string">,
                   <dtml-sqlvar vidproveedor type="int">,
                   <dtml-sqlvar vprecio type="nb">,
                   <dtml-sqlvar vfechacompra type="string">,
                   <dtml-sqlvar vdescripcion type="string">)
</sql-method> 

Thank in advance
-- 
Alvaro Jesus Hernandez Arteaga
alhernan at uc.edu.ve
Linux Counter: 122569




More information about the Zope mailing list