Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Delphi and Oracle: data type problem

Re: Delphi and Oracle: data type problem

From: Lothar Armbrüster <lothar.armbruester_at_rheingau.netsurf.de>
Date: 01 Oct 98 20:08:01 +0100
Message-ID: <1519.578T85T12082856@rheingau.netsurf.de>


On 01-Okt-98 14:22:24 Sergey Tavanets wrote:

>The reason why Delphi chooses TFloatField over TIntegerField is that
>TIntegerField can represent ONLY 4-byte Integers (natural Delphi
>Integer type). The maximal posible value for TIntegerField is
>4294967295. If you look at this number you may notice it has exactly 10
>digits which corresponds to number(10) in Oracle. Now if you have a
>column of number(n) type where n > 10 Delphi cannot handle such numbers
>using 4-byte integers the only way (for Delphi3) is to use floating
>point data types which allow more significant digits to be stored.
>Delphi4 introduced 8-byte Int64 type but it has no reflection for
>TField descendants.

>Regards, Sergey.

>P. S. The situation is slightly differnet with TParam class but the
>behaviour Delphi (or BDE) demonstrates is not quite clear for me.

Here is some funny experiance with Delphi:

If you have a NUMBER(10), Delphi uses a TIntField which uses 32Bit ints. That means you have no way inserting say 5000000000 using these field component.
NUMBER(5) is also critical because Delphi uses TShortIntField with 16Bit ints. So you cannot insert 90000 into such a field. If you use TQuery, you can do it, when you try to retrieve such numbers, the results are not usable.
So be careful with such number sizes or set enable_integers to FALSE in the BDE config.

CU,
Lothar

--

Lothar Armbrüster       | lothar.armbruester_at_rheingau.netsurf.de
Schulstr. 12            | lothar.armbruester_at_t-online.de
D-65375 Oestrich-Winkel |

Received on Thu Oct 01 1998 - 14:08:01 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US