While running some tests I came across this. I was updating a field (NACTNB) defined as double with a value of 123456789.1234 but the actual command to the DB was:
UPDATE SRBNAM SET NACTNB=123456789.123 WHERE SRBNAM.NANUM='999999'; note the missing 4 at the end of the value. This seems to be a problem with function str in Python (2.5.4 here). >>> c=123456789.1234 >>> c 123456789.1234 >>> str(float(c)) '123456789.123' >>> float(c) 123456789.1234 In sql.py, update calls _update which calls sql_represent which uses str(float(obj)) for fieldtype 'double'. Possible fix: change str(float(obj)) to repr(float(obj)) DenesL --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

