problems with number(1) fields between Ora9iR2 and Ora10gR2

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
hannes_a
Posts: 77
Joined: Sun 22 Jan 2006 20:44
Location: munic

problems with number(1) fields between Ora9iR2 and Ora10gR2

Post by hannes_a » Sun 22 Jan 2006 21:27

When I generate fields in Delphi 7 with "add all fields", then number(1) comes as TFloatfield with Oracle 9iR2.
And when I connect to a Oracle 10gR2 with same fieltypes in my database, then my executeable raises an error "differnt fieldtype" :(

With Delphi 7 connected to 10g and "add all fields" its generate TIntegerfields. :shock:

It would be great if you can give me some hint about this issue.

thanks hannes

I use Delphi 7 with ODAC 5.55.1.26

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Mon 23 Jan 2006 15:46

Please specify script to create your table and SELECT SQL statement. If you use UNIONs please see http://crlab.com/forums/viewtopic.php?p=1294#1294

hannes_a
Posts: 77
Joined: Sun 22 Jan 2006 20:44
Location: munic

Post by hannes_a » Mon 23 Jan 2006 19:22

thanks for your quick answer !

we use UNIONs, but we can't change all our customers oracle instances, (we have to much)
Thats why I've to solve this, here are the scripts

http://hannes.dyndns.info/odac_create_dbscript.sql

http://hannes.dyndns.info/odac_select.sql
in the script there's a comment which fields are wrong

thank you

hannes_a
Posts: 77
Joined: Sun 22 Jan 2006 20:44
Location: munic

Post by hannes_a » Mon 23 Jan 2006 22:26

select fieldx from table
union
select fieldx from table

fieldx number(1) receives an tfloatfield in delphi 7 with Oracle 9.2.0.2 and Oracle 10.1. BUT
fieldx number(1) receives an tintegerfield in delphi 7 with Oracle 9.2.0.7 and Oracle 10.2.0.1

for me, this solution works:
select cast(fieldx as integer) from table
union
select cast(fieldx as integer) from table

fieldx number(1) receives an tintegerfield in delphi 7 with all Oracle Versions :wink:

regards hannes

Post Reply