Page 1 of 1

Long Integer displays as float

Posted: Mon 13 Aug 2007 18:03
by bormo
Hi,

When length of integer value more than 15 digits it displays in grid as float (with E).

torasession.EnableIntegers and torasession.EnableNumbers do not help

toraquery.Options[FieldsAsString] helps but converts value to string

Somebody have solution?

Thank you!

Posted: Tue 14 Aug 2007 08:29
by Plash
ODAC creates TFloatField for fields with large precision because the Integer data type in Pascal can hold only 9 decimal digits. The TDBGrid component converts these float values to strings using the FloatToStr function. There is no way to setup TDBGrid to display values in fixed format.
You should either set the FieldsAsString option, or use the TGrid component instead of TDBGrid and fill the grid manually using FormatFloat function to convert values to strings.

Posted: Thu 16 Aug 2007 18:51
by bormo
No, in this case grid is not a problem because I am using not standard Delphi grid.

Problem is - property EnableNumbers does not work on NET (when OraSession.Options.Net=true) and works properly on OCI connection.

How it can be fixed?

Posted: Fri 17 Aug 2007 07:15
by Plash
We could not reproduce the problem.
Please supply us the following information
- exact version of ODAC including build number (see Oracle | About ODAC in the IDE menu);
- exact version of Delphi, C++Builder or Kylix.

Posted: Sat 25 Aug 2007 07:54
by bormo
Delphi 6 build 240 pack 2
ODAC NET 5.55.1.22

Posted: Mon 27 Aug 2007 09:10
by Plash
This problem was fixed in the last ODAC version. You should install the last build of ODAC 5 or ODAC 6.

Posted: Tue 28 Aug 2007 22:36
by bormo
Thank you!