Subject [IBO]Formatting doubles has broken
Author Paul Hope
Hi



Having upgraded to 4.3Aa I now have a problem which wasn't there before.



Setup a TIB_Query with 'select DoublePrecisionNumber from MyTable' .



Attach an IB_Datasource to the query and IB_Grid (or any other sort of data
aware control) to the datasource.



Enter the query editor, prepare and set the fields DisplayFormat to #0.0000.



When the query is opened it generates the error 'nn.nnn is not a valid
integer' - where nn.nnn is the double precision value it tried to display.



The problem is in



function TIB_Column.GetAsExtended: extended;

var

tmpS: string;

begin

tmpS := AsString;

if tmpS = '' then

Result := 0

else

if SQLScale = 0 then

Result := StrToInt( tmpS ) <----- fails here because SQLScale is 0

else

Result := StrToFloat( tmpS );

end;



This is called by GetDisplayText



The error does not occur if the DisplayFormat value is removed.



BTW - don't look at the data in the query editor - you cant get out of it.



Hope this can get fixed



Regards

Paul





[Non-text portions of this message have been removed]