Page 1 of 1

problems with number(1) fields between Ora9iR2 and Ora10gR2

Posted: Sun 22 Jan 2006 21:27
by hannes_a
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

Posted: Mon 23 Jan 2006 15:46
by Challenger
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

Posted: Mon 23 Jan 2006 19:22
by hannes_a
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

Posted: Mon 23 Jan 2006 22:26
by hannes_a
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