[Zope] Passing arguments to ZSQL method

Juan Carlos Coruņa jcoruna@umd.es
Mon, 10 Apr 2000 18:21:27 +0200


-----Mensaje original-----
De: pibizza@icube.it [mailto:pibizza@icube.it]En nombre de Paolo
bizzarri
Enviado el: martes, 11 de abril de 2000 17:34
Para: Juan Carlos Coruqa
Asunto: Re: [Zope] Passing arguments to ZSQL method


Hi,


> ...
> <dtml-call "SQL.update_Cantidad_en_Lin__venta(N__documento=N__documento,
>                                               N__linea=N__linea,
>                                               Cantidad=10,
>                                               N_=N_)">
> .
>
> update_Cantidad_en_Lin__venta is a ZSQL method to update a row.
>
> If I call the dtml method with:
> index_html?Cantidad=3&N__documento=ES356&N__linea=10000&N_=GE-RNEW
> then the field "Cantidad is updated with 3 instead of 10.
>
>

Apparently, python is taking Cantidad=10 as a default value (i.e.,
something to use if nothing else is specified).

Have you tried not to use a Cantidad=3 line in the invocation ?



--
Paolo Bizzarri - Responsabile Marketing  I3 Icube Srl
Sede:   Via Ridolfi 15 - 56124 Pisa (PI), Italia
E-mail: p.bizzarri@icube.it             WWW: www.icube.it
Tel:    (+39) 050 97 02 07              Fax: (+39) 050 31 36 588

I must invoke the method with Cantidad=3, because I do a test with this
value and depending on the result I execcute the SQL method.