Delphi 10.3
Omnithead 3.07.5
Hi All
here is a definition of an array of ..
TpDataType = (dtNone, dtInteger, dtDateTime, dtString, dtBlob);
rParameter = record
Field : string;
Value : Variant;
AsValue : TpDataType;
end;
TParameters = array of rParameter;
I would like to pass it to a worker as parameter, so
CreateTask(Worker)
.MonitorWith(OTLMonitor)
.SetParameter('Params',TOmniValue.Create([Params]);
I've tried also
.SetParameter('Params',TOmniValue.FromArray<TParameters>(Params))
and convert it again like
function TConnectionPoolData.WithParameters(const aValue : TOmniValue) : IConnectionPoolData;
begin FParams := aValue.CastTo<TParameters>;
Result:=Self;
end;
But it's not working as expected, as I'm getting bunch of data
Do I need to use a class instead ?
Thanks
Patrick