I want to extend the class TMyQuery with the property parameters. I want to call TMyQuery with the same syntax as using a TADOQuery. How to extend my Class correctly ?
/// new class
type TMyQuery = class (TFDQuery)
private
procedure SetParamByName(const Param: TParam);
public
/// here i fail !
property Parameters[const AName: string]: TParam Write SetParamByName;
end;
procedure TMyQuery.SetParamByName(const Param: TParam);
begin
// Params.ParamByName(AName). ??? ;
end;
/// code example
...
...
/// calling FFDQuery with same syntax like ADO Query
qryInsert.Parameters.ParamByName('ID').AsInteger := recordCount;
You can try some like this:
On implementation of the procedure try this:
Is this what you need?