Hello
You confuse storing numbers in the memory and numbers text representation. For example 0.000001 and 1E-6 is the same number and it is stored in the memory identically.
When you try to show this number:
Code: Select all
ShowMessage(OraQuery1.fieldbyname('n5').AsString);
Then Delphi call the following function in the DB unit:
Code: Select all
function TFloatField.GetAsString: string;
var
F: Double;
begin
if GetData(@F) then Result := FloatToStr(F) else Result := '';
end;
This function returns the following text representation: 1E-6
If you don't want to use standard Delphi conversion of Float data to text, then you can use the following code:
Code: Select all
ShowMessage(FormatFloat('0.##########', OraQuery1.fieldbyname('n5').AsFloat));
Also you can specify format for TFloatField when it will be displayed in the TDBGrid:
Code: Select all
TFloatField(OraQuery1.fieldbyname('n5')).DisplayFormat :='0.##########';
ODAC components just store data as number in the memory and doesn't convert it to text representation.