On 2008-01-23 14:35, siribu wrote:
> I have got a problem:
> accessing an Oracle 10g database, whenever I ask for floats from a Zope Z SQL
> method, they are automatically converted to integers, simply dropping the
> decimal numbers.
> I am using Zope 2.10.4-final with Python 2.4.4 running on a Linux2 OS.
> Furthermore, I am using UnixODBC with Easysoftâ€^(TM)s ODBC-Oracle driver
> with eGenix *mxODBC Zope DA*.
There's a connection option " Leave scale 0 floats untouched ?" to switch
The truncation to integers is done because some database drivers always
return numbers as floats - even integers. Zope would then display these
as floats (without additional formatting), which may not look right to
> Running iSQL on the server or even utilizing the mxODBC Zope DA driver
> in Python works well without problems.
> The error logs for the ODBC contained no sign or errors. Neither did I get
> response when I ran Event Log Manager in Zope. I could not find anything in
> Any clues on how to solve this?
See above: just switch on the option in the connection properties.
Professional Python Services directly from the Source (#1, Feb 03 2008)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
:::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! ::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
Zope-DB mailing list