Is there any way to determine the scale of a number field?

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Moehre
Posts: 42
Joined: Fri 11 Nov 2005 11:37

Is there any way to determine the scale of a number field?

Post by Moehre » Sat 27 Oct 2007 07:51

Hello!

I searched this forum and the internet without any solution, so I ask you as oracle experts:

In my application it is neccesarry to get the scale of numbers f.e. NUMBER(12,3) with 3 digits scale. I can access the precision of 12 in TDataset.FieldDefs[x].Precision but can not find any information about the 3 digits scale. Is there any way to get this information? And, by the way, why is TDataset.FieldDefs[x].Size = 0 ?? In my optinion, size should be 12 and precision 3 ...?

Thx
Moehre

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 29 Oct 2007 09:08

You can use the GetFieldScale and GetFieldPrecision methods of TOraQuery to get precision and scale of a field. We'll consider possibility to fill in the Size property of TFieldDesc for NUMBER fields in either of the next ODAC versions.

Post Reply