<P>Hi,</P>
<P>well, it worked testing in&nbsp;Python using the eGenix API even without setting the NLS_NUMERIC_CHARACTERS explicitly. Thus, I assume that the ODBC interface toward Python should be working&nbsp;automatically&nbsp;using default settings. </P>
<P>- thus I am guessing that it might be Zope that does not find the right environment variable. Tell me if I'm wrong.</P>
<P>Also, it is worth noting that I have converted to a Norwegian character set, whereas in <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>&nbsp;they are converting to a German character set. Might have something to do with reproducing the error.</P>
<P>-su</P>
<P><BR>
<BR>
<BR>
<BR>
<B>On Mon Feb 4 11:34 , "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-02-04 08:19, siribu wrote:<BR>
<SPAN style="COLOR: #ff0000">&gt; Hi,</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; I found the a solution to the problem, it cannot be done just by " Leave scale 0 </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; floats untouched ?" which I tried, but also the Oracle parameter </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; NLS_NUMERIC_CHARACTERS needed to be set explicitly. </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; See <A href="http://epost.start.no/mail/parse.pl?redirect=http://www.osdir.com/ml/web.zope.database/2003-01/msg00036.html." target=_blank><SPAN style="COLOR: #ff0000">http://www.osdir.com/ml/web.zope.database/2003-01/msg00036.html.</SPAN></A> That solved </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; things for me.</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; Anyway, thanks Marc-Andre :-)</SPAN><BR>
<BR>
You're welcome.<BR>
<BR>
Could you explain why you had to set the NLS_NUMERIC_CHARACTERS variable ?<BR>
<BR>
Is this needed for the ODBC driver to convert numbers to and from<BR>
strings correctly ?<BR>
<BR>
<BR>
<SPAN style="COLOR: #ff0000">&gt; *On Sun Feb 3 12:37 , "M.-A. Lemburg" sent:</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; On 2008-01-23 14:35, siribu wrote:</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &gt; Hi,</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &gt;</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &gt;</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &gt;</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &gt; I have got a problem:</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &gt;</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &gt;</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &gt;</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &gt; accessing an Oracle 10g database, whenever I ask for floats from a Zope Z SQL</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &gt; method, they are automatically converted to integers, simply dropping the</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &gt; decimal numbers.</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &gt;</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &gt;</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &gt;</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &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; &gt; Furthermore, I am using UnixODBC with Easysoftâ€^(TM)s ODBC-Oracle driver</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; together</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &gt; with eGenix *mxODBC Zope DA*.</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; There's a connection option " Leave scale 0 floats untouched ?" to switch</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; this off.</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; The truncation to integers is done because some database drivers always</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; return numbers as floats - even integers. Zope would then display these</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; as floats (without additional formatting), which may not look right to</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; the user.</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &gt; Running iSQL on the server or even utilizing the mxODBC Zope DA driver</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; directly</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &gt; in Python works well without problems.</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &gt;</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &gt;</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &gt;</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &gt; The error logs for the ODBC contained no sign or errors. Neither did I get</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; any</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &gt; response when I ran Event Log Manager in Zope. I could not find anything</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; in syslog.</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &gt;</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &gt;</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &gt;</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &gt; Any clues on how to solve this?</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; See above: just switch on the option in the connection properties.</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; -</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; Marc-Andre Lemburg</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; eGenix.com</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; Professional Python Services directly from the Source (#1, Feb 03 2008)</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &gt; &gt;&gt; Python/Zope Consulting and Support ... <A href="http://epost.start.no/mail/parse.pl?redirect=http://www.egenix.com/" target=_blank><SPAN style="COLOR: #ff0000">http://www.egenix.com/</SPAN></A></SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &lt;<A href="http://epost.start.no/mail/parse.pl?redirect=http://epost.start.no/mail/parse.pl%3Fredirect%3Dhttp%253A%252F%252Fwww.egenix.com%252F" target=_blank><SPAN style="COLOR: #ff0000">http://epost.start.no/mail/parse.pl\?redirect=http://www.egenix.com/</SPAN></A>&gt;</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &gt; &gt;&gt; mxODBC.Zope.Database.Adapter ... <A href="http://epost.start.no/mail/parse.pl?redirect=http://zope.egenix.com/" target=_blank><SPAN style="COLOR: #ff0000">http://zope.egenix.com/</SPAN></A></SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &lt;<A href="http://epost.start.no/mail/parse.pl?redirect=http://epost.start.no/mail/parse.pl%3Fredirect%3Dhttp%253A%252F%252Fzope.egenix.com%252F" target=_blank><SPAN style="COLOR: #ff0000">http://epost.start.no/mail/parse.pl\?redirect=http://zope.egenix.com/</SPAN></A>&gt;</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &gt; &gt;&gt; mxODBC, mxDateTime, mxTextTools ... <A href="http://epost.start.no/mail/parse.pl?redirect=http://python.egenix.com/" target=_blank><SPAN style="COLOR: #ff0000">http://python.egenix.com/</SPAN></A></SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; &lt;<A href="http://epost.start.no/mail/parse.pl?redirect=http://epost.start.no/mail/parse.pl%3Fredirect%3Dhttp%253A%252F%252Fpython.egenix.com%252F" target=_blank><SPAN style="COLOR: #ff0000">http://epost.start.no/mail/parse.pl\?redirect=http://python.egenix.com/</SPAN></A>&gt;</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; ________________________________________________________________________</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! ::::</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; </SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; Registered at Amtsgericht Duesseldorf: HRB 46611</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; Få din egen, gratis e-postadresse på Start.no &lt;<A href="http://epost.start.no/mail/parse.pl?redirect=http://www.start.no/" target=_blank><SPAN style="COLOR: #ff0000">http://www.start.no/</SPAN></A>&gt;</SPAN><BR>
<SPAN style="COLOR: #ff0000">&gt; </SPAN><BR>
<BR>
-- <BR>
Marc-Andre Lemburg<BR>
eGenix.com<BR>
<BR>
Professional Python Services directly from the Source (#1, Feb 04 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://www.egenix.com/" 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://zope.egenix.com/" 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://python.egenix.com/" 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>
-------------------------------------------------------------------------
Få din egen, gratis e-postadresse på Start.no