* Do not pass by variant type detection when setting value

This commit is contained in:
Michaël Van Canneyt 2023-10-15 17:45:45 +02:00
parent 2bea7d21f6
commit 4fb43b145f

View File

@ -8954,68 +8954,68 @@ end;
Procedure TParam.SetAsBlob(const AValue: TBlobData); Procedure TParam.SetAsBlob(const AValue: TBlobData);
begin begin
FDataType:=ftBlob; FDataType:=ftBlob;
Value:=AValue; FValue:=AValue;
end; end;
Procedure TParam.SetAsBoolean(AValue: Boolean); Procedure TParam.SetAsBoolean(AValue: Boolean);
begin begin
FDataType:=ftBoolean; FDataType:=ftBoolean;
Value:=AValue; FValue:=AValue;
end; end;
procedure TParam.SetAsBytes(const AValue: TBytes); procedure TParam.SetAsBytes(const AValue: TBytes);
begin begin
// ?
end; end;
Procedure TParam.SetAsDate(const AValue: TDateTime); Procedure TParam.SetAsDate(const AValue: TDateTime);
begin begin
FDataType:=ftDate; FDataType:=ftDate;
Value:=AValue; FValue:=AValue;
end; end;
Procedure TParam.SetAsDateTime(const AValue: TDateTime); Procedure TParam.SetAsDateTime(const AValue: TDateTime);
begin begin
FDataType:=ftDateTime; FDataType:=ftDateTime;
Value:=AValue; FValue:=AValue;
end; end;
Procedure TParam.SetAsFloat(const AValue: Double); Procedure TParam.SetAsFloat(const AValue: Double);
begin begin
FDataType:=ftFloat; FDataType:=ftFloat;
Value:=AValue; FValue:=AValue;
end; end;
Procedure TParam.SetAsInteger(AValue: Longint); Procedure TParam.SetAsInteger(AValue: Longint);
begin begin
FDataType:=ftInteger; FDataType:=ftInteger;
Value:=AValue; FValue:=AValue;
end; end;
Procedure TParam.SetAsLargeInt(AValue: NativeInt); Procedure TParam.SetAsLargeInt(AValue: NativeInt);
begin begin
FDataType:=ftLargeint; FDataType:=ftLargeint;
Value:=AValue; FValue:=AValue;
end; end;
Procedure TParam.SetAsMemo(const AValue: string); Procedure TParam.SetAsMemo(const AValue: string);
begin begin
FDataType:=ftMemo; FDataType:=ftMemo;
Value:=AValue; FValue:=AValue;
end; end;
Procedure TParam.SetAsString(const AValue: string); Procedure TParam.SetAsString(const AValue: string);
begin begin
if FDataType <> ftFixedChar then if FDataType <> ftFixedChar then
FDataType := ftString; FDataType := ftString;
Value:=AValue; FValue:=AValue;
end; end;
Procedure TParam.SetAsTime(const AValue: TDateTime); Procedure TParam.SetAsTime(const AValue: TDateTime);
begin begin
FDataType:=ftTime; FDataType:=ftTime;
Value:=AValue; FValue:=AValue;
end; end;
Procedure TParam.SetAsJSValue(const AValue: JSValue); Procedure TParam.SetAsJSValue(const AValue: JSValue);
@ -9037,7 +9037,6 @@ Procedure TParam.SetDataType(AValue: TFieldType);
begin begin
FDataType:=AValue; FDataType:=AValue;
end; end;
Procedure TParam.SetText(const AValue: string); Procedure TParam.SetText(const AValue: string);