Hello!
I got the same error/
I check the sources and found:
Code: Select all
unit LiteClassesUni;
...
procedure TSQLiteConnection.RegisterInternalFunctions;
begin
...
TSQLiteFunctionManager(FunctionManager).RegisterFunction('ROUND', 2, InternalRound);
end;
...
procedure TSQLiteConnection.InternalRound(InValues: array of Variant; var ResultValue: Variant);
begin
ResultValue := Round(double(InValues[0]) * Power(10, InValues[1])) / Power(10, InValues[1]);
end;
procedure TSQLiteConnection.InternalRound should check, if any values is NULL, and returns NULL in this case:
Code: Select all
procedure TSQLiteConnection.InternalRound(InValues: array of Variant; var ResultValue: Variant);
begin
if VarIsNull(InValues[0]) or VarIsNull(InValues[1]) then
ResultValue := Null
else
ResultValue := Round(double(InValues[0]) * Power(10, InValues[1])) / Power(10, InValues[1]);
end;
DevArt, please, fix this and similar functions.
Or make the way to disable redefining native functions.