AW: [ZOPE] DCOracle2 and Oi9 RC2, wrong number values in select

Matthew T. Kromer matt@zope.com
Wed, 02 Oct 2002 15:06:37 -0400


FYI I apologize if Mozilla converts this note in a crappy way ;)  

Dieter Fischer wrote:

>Hello
>
>I've a simple "Z SQL Method":
>
>select * from zahlen
>
>"zahlen" is the table, I've ddescribed in my email before. I can see the
>wrong numbers when I select the Test tab of the method.
>
>Below the script for the Ora-Table:
>
>CREATE TABLE ZAHLEN (
>  INTEGER_      INTEGER,
>  NUMBER_10_1   NUMBER (10,1),
>  NUMBER_10_2   NUMBER (10,2),
>  NUMBER_10_5   NUMBER (10,5),
>  DECIMAL_10_0  NUMBER (10),
>  DECIMAL_10_1  NUMBER (10,1),
>  DECIMAL_10_2  NUMBER (10,2),
>  DECIMAL_10_5  NUMBER (10,5),
>  REAL_         FLOAT (63),
>  SMALLINT_     INTEGER,
>  FLOAT_        FLOAT (10) ) ;
>
>Regards
>
>Dieter
>  
>

I ran this, and inserted 100.5 into each column.  Under Zope, I created 
an identical SQL method and then tested it:  I got the following results:

------------------------------------------------------------------------
INTEGER NUMBER 10 1 NUMBER 10 2 NUMBER 10 5 DECIMAL 10 0 DECIMAL 10 1 
DECIMAL 10 2 DECIMAL 10 5 REAL SMALLINT FLOAT
101 100.5 100.5 100.5 101 100.5 100.5 100.5 100.5 101 100.5

------------------------------------------------------------------------
SQL used:

select * from zahlen

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


That's why I'm not sure what it is that you're doing differently.

Under the "Debug" tab of the Connection I created, I have the following:

Oracle version strings:

    * DCOracle2: (cvs release) -- DCOracle2 1.95 (dco2: 1.120 -DORACLE8i
      -DORACLE9i -DUSEOBJECT -Dlinux -D_REENTRANT )
    * TNS for Linux: : 9.0.1.0.0 (Production)
    * Oracle9i Enterprise Edition : 9.0.1.0.0 (Production)
    * PL/SQL : 9.0.1.0.0 (Production)
    * NLSRTL : 9.0.1.0.0 (Production)