Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Delphi and Oracle: data type problem
>I use Delphi as a front-end tool to write application that talks to an
>Oracle database. I have a problem with the Data Type conversion from Oracle
>to Delphi. In Oracle tables, I have a field with type NUMBER(10), however
>when I use Delphi's Field Editor to add the fields in Oracle tables to
>Delphi application, the NUMBER(10) field in Oracle is converted into
>TFloatField in Delphi. How does Delphi pick the field type from Oracle
>tables? I have noticed that sometimes Delphi converts NUMBER(10) to
>TFloatField, sometimes converts to TIntegerField, why?
The BDE does not understand that a Number field without scale is really an integer. Neither does it understand cursor variables very well. Since I do a lot of work with Oracle, I decided to write my own component that was both package and datatype aware. This component looks at the system tables to see if a type is a NUMBER, and if it has no scale, sets the Delphi datatype to integer. You can do the same thing dynamically in code. Received on Fri Sep 25 1998 - 15:07:42 CDT
![]() |
![]() |