<P>Hi,</P>
<P>I found the a solution to the problem, it cannot be done&nbsp;just by " Leave scale 0 floats untouched ?"&nbsp;&nbsp; which&nbsp;I tried, but also the Oracle parameter NLS_NUMERIC_CHARACTERS needed to be set explicitly. See&nbsp;<A href="http://www.osdir.com/ml/web.zope.database/2003-01/msg00036.html">http://www.osdir.com/ml/web.zope.database/2003-01/msg00036.html</A>. That solved things for me.</P>
<P>Anyway, thanks Marc-Andre&nbsp; :-)<BR>
<BR>
<BR>
<BR>
<B>On Sun Feb 3 12:37 , "M.-A. Lemburg" <MAL@EGENIX.COM>sent:<BR>
<BR>
</P></B>
<BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #f5f5f5 2px solid; MARGIN-RIGHT: 0px">On 2008-01-23 14:35, siribu wrote:<BR>
<SPAN style="COLOR: #ff0000">&gt; Hi,</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; I have got a problem:</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; accessing an Oracle 10g database, whenever I ask for floats from a Zope Z SQL </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; method, they are automatically converted to integers, simply dropping the </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; decimal numbers.</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; I am using Zope 2.10.4-final with Python 2.4.4 running on a Linux2 OS. </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; Furthermore, I am using UnixODBC with Easysoftâ€^(TM)s ODBC-Oracle driver together </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; with eGenix *mxODBC Zope DA*.</SPAN><BR>
<BR>
There's a connection option " Leave scale 0 floats untouched ?" to switch<BR>
this off.<BR>
<BR>
The truncation to integers is done because some database drivers always<BR>
return numbers as floats - even integers. Zope would then display these<BR>
as floats (without additional formatting), which may not look right to<BR>
the user.<BR>
<BR>
<SPAN style="COLOR: #ff0000">&gt; Running iSQL on the server or even utilizing the mxODBC Zope DA driver directly </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; in Python works well without problems. </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; The error logs for the ODBC contained no sign or errors. Neither did I get any </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; response when I ran Event Log Manager in Zope. I could not find anything in syslog.</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; Any clues on how to solve this?</SPAN><BR>
<BR>
See above: just switch on the option in the connection properties.<BR>
<BR>
-<BR>
Marc-Andre Lemburg<BR>
eGenix.com<BR>
<BR>
Professional Python Services directly from the Source (#1, Feb 03 2008)<BR>
<SPAN style="COLOR: #ff0000">&gt;&gt;&gt; Python/Zope Consulting and Support ... <A href="http://epost.start.no/mail/parse.pl?redirect=http%3A%2F%2Fwww.egenix.com%2F" target=_blank><SPAN style="COLOR: #ff0000">http://www.egenix.com/</SPAN></A></SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt;&gt;&gt; mxODBC.Zope.Database.Adapter ... <A href="http://epost.start.no/mail/parse.pl?redirect=http%3A%2F%2Fzope.egenix.com%2F" target=_blank><SPAN style="COLOR: #ff0000">http://zope.egenix.com/</SPAN></A></SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt;&gt;&gt; mxODBC, mxDateTime, mxTextTools ... <A href="http://epost.start.no/mail/parse.pl?redirect=http%3A%2F%2Fpython.egenix.com%2F" target=_blank><SPAN style="COLOR: #ff0000">http://python.egenix.com/</SPAN></A></SPAN><BR>
________________________________________________________________________<BR>
<BR>
:::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! ::::<BR>
<BR>
<BR>
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48<BR>
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg<BR>
Registered at Amtsgericht Duesseldorf: HRB 46611<BR>
<BR>
</BLOCKQUOTE><BR><p>
-------------------------------------------------------------------------<br>
Få din egen, gratis e-postadresse på <a href="http://www.start.no/">Start.no</a>
</p>