[Zope] Working with sqlvar type=float

Mike Doanh Tran mtran at shufflemasterrd.com
Mon Oct 20 15:58:58 EDT 2003


I used the ZPublisher to convert a variable into a  type float(see input
field below).  I passed the variable "balance" to a ZSQL method where
balance was set as type=float.  I keep getting an "invalid floating point
type error" when i called the updateBal ZSQ method. I even tried to
convert balance with _.float(balance) but still get the same error.  The
mysql db field for balance is set as type float.  Can someone help me please?

<input type="text" name="rec.balance:float:ignore_empty:records" value="">
---------------------------------
<dtml-in rec mapping>
  <dtml-call "updateBal(balance=balance,Cust_ID=Cust_ID)">
</dtml-in>
--------------------------------
ZSQL Method: updateBal
UPDATE customers SET
balance=<dtml-sqlvar balance type=float>
WHERE Cust_ID=<dtml-sqlvar Cust_ID type=nb>
--------------------------------

Thanks,

Mike

-------------------------------------------------------



More information about the Zope mailing list