close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 14 years ago

Last modified 13 years ago

#983 accepted defect

problemas con tipo de datos

Reported by: Chakib Faghloumi Owned by: Jorge
Priority: high Milestone:
Component: Database Version: 2.0.1
Severity: blocker Keywords: odbc oracle
Cc: apalonso@…

Description

Hola,
con el gestor oracle, el DBTable y el DBSeries...
no reconocen el tipo de dato decimal
mando un ejemplo
Sentencia:
Real real_1 = 0.52;
Real real_2 = DBTable("Select Cast( "+FormatReal(real_1)+" as decimal(10,5)) from dual")[1][1];
Real real_3 = DBTable("Select Cast( "+FormatReal(real_1)+" as float) from dual")[1][1];
Salida:
Real real_1 = 0.52; #bien#
Real real_2 = 0; #mal#
Real real_3 = 0.52; #bien#

Change History (4)

comment:1 Changed 14 years ago by Jorge

Cc: apalonso@… added
Status: newaccepted

Tengo que configurar una conexión odbc con oracle.

comment:2 Changed 14 years ago by Jorge

Esto es lo que se obtiene desde la consola isql de odbc:

as decimal:

SQL> Select Cast( 0.52 as decimal(10,5)) from dual
+--------------------------+
| CAST(0.52ASDECIMAL(10,5))|
+--------------------------+
| .52                      |
+--------------------------+
SQLRowCount returns -1
1 rows fetched

as float:

SQL> Select Cast( 0.52 as float) from dual
+-----------------------------------------+
| CAST(0.52ASFLOAT)                       |
+-----------------------------------------+
| .52                                     |
+-----------------------------------------+
SQLRowCount returns -1
1 rows fetched

comment:3 Changed 14 years ago by Jorge

Ejecutado en ubuntu, el error no se manifiesta

22:44:20 TOL> Real real_3 = DBTable("Select Cast( "+FormatReal(real_1)+" as float) from dual")[1][1]
0.52
22:44:40 TOL> 

Hay que reproducirlo en windows.

comment:4 Changed 13 years ago by Jorge

(In [4537]) fixes #1503, refs #1022,#983,#300,#296, BIGINT is returned as SQL_C_CHAR then converted to Real

Note: See TracTickets for help on using tickets.