Hi All
Lazarus 1.8.4 r57972 FPC 3.0.4 i386-win32-win32/win64
When I call VarToStr in code of my project it raises RunError(201) exception.
I can't understand why
See screenshots
Variant value contains FMTBdcValue, but the "Watch List" does'n show the value.
So I can't create exact example for reproduction.
The code is the next:
procedure TDBGridEhNavigatorPanel.Test(var ResultArr: TAggrResultArr);
var
s1, s2, s3: String;
v1, v2, v3: Variant;
begin
v1 := ResultArr[agfSumEh];
v2 := ResultArr[agfCountEh];
s1 := VarToStr(ResultArr[agfSumEh]);
s2 := VarToStr(ResultArr[agfCountEh]);
v3 := v1 / v2;
s3 := VarToStr(v3); //RunError(201) exception
end;
value of ResultArr[agfSumEh] and ResultArr[agfCountEh] is visible on screenshots
but when I assign values manually the exception is not raised.