Page 1 of 1

Field type diference between Oracle 8.1.7 and Oracle 10g

Posted: Tue 10 Apr 2007 03:06
by AlexandreECAD
Take a look in my situation:

I've one table with some fields, but in my query I only use 2 fields
[ID NUMBER and DESC VARCHAR2(40)]
I've in this table 16694 records and my hihgest ID number is 48586.

I've added all the fields in oracle 8.1.7 and received an TIntegerField for the ID.

When I execute this program in a Oracle 10g database I receive an error informing that received an Integer and a Float was expected.

If I remove the fields, connect to Oracle 10g and insert the fields again this time I receive a TFloatField for the ID.

This only happens when the field in my table is defined like NUMBER when I use NUMBER(7) isnt happening.

My DBA opened an call in metalink and they informed him that there is no problem with our Oracle 10g installation and must be a problem with the software we was using.

Is there something I can do or I'll have to delete and insert all fields in my application prior my migration to oracle 10g?

I hope you can undestand me.

Best regards.

Posted: Tue 10 Apr 2007 08:54
by Plash
Type of the field created by ODAC depends on the field precision. By default TFloatField is created if the precision is more than 9. The problem is that the Oracle 8 and Oracle 10 databases returns different precision for this field.
You can change value of the IntegerPrecision variable from the OraClases unit to solve the problem. Use the initialization section of one of your program unit.

Code: Select all

initialization
  IntegerPrecision := 38;
end.

Posted: Tue 10 Apr 2007 12:54
by AlexandreECAD
Do I've to do this in only one unit or every unit that I've the problem?

Posted: Tue 10 Apr 2007 14:17
by Challenger
You should do this only in the main unit of your project.

Posted: Tue 10 Apr 2007 16:11
by AlexandreECAD
OK THANKS