Subject | Re: [IBO] Using Display Format |
---|---|
Author | Helen Borrie |
Post date | 2004-05-23T22:56:40Z |
At 06:51 PM 22/05/2004 +0000, you wrote:
version. I'll try to find a way to make the test_b patch available until
Jason gets around to releasing the final version.
In IB_Components.pas, function TIB_Column.GetAsExtended
var
tmpS: string;
begin
tmpS := AsString;
if tmpS = '' then
Result := 0
else
if SQLScale = 0 then
Result := StrToInt( tmpS )
else
Result := StrToFloat( tmpS );
end;
Replace with
var
tmpS: string;
begin
tmpS := AsString;
if tmpS = '' then
Result := 0
else
case SQLType of
SQL_FLOAT, SQL_FLOAT_: Result := AsFloat;
SQL_DOUBLE, SQL_DOUBLE_: Result := AsDouble;
else
if SQLScale = 0 then
Result := StrToInt( tmpS )
else
Result := StrToFloat( tmpS );
end;
end;
Helen
>Hi,Here's the fix - but it won't help much if you are using the evaluation
>
>I've asked this question several times but I have yet to get an
>answer. I am trying to use a display format on a double field $,0.00
>to show a dollar sign.
>
>I constantly get the error "value xxx.xx is not a valid integer value"
>I am not trying to convert anything.
>
>Helen had mentioned this was a bug and a fix was available but I have
>been unable to locate it.
>
>Can anyone help?
version. I'll try to find a way to make the test_b patch available until
Jason gets around to releasing the final version.
In IB_Components.pas, function TIB_Column.GetAsExtended
var
tmpS: string;
begin
tmpS := AsString;
if tmpS = '' then
Result := 0
else
if SQLScale = 0 then
Result := StrToInt( tmpS )
else
Result := StrToFloat( tmpS );
end;
Replace with
var
tmpS: string;
begin
tmpS := AsString;
if tmpS = '' then
Result := 0
else
case SQLType of
SQL_FLOAT, SQL_FLOAT_: Result := AsFloat;
SQL_DOUBLE, SQL_DOUBLE_: Result := AsDouble;
else
if SQLScale = 0 then
Result := StrToInt( tmpS )
else
Result := StrToFloat( tmpS );
end;
end;
Helen