我想用属性参数扩展类TMyQuery。我想用和使用TADOQuery相同的语法调用TMyQuery。如何正确扩展我的类?
/// 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;
字符串
1条答案
按热度按时间cygmwpex1#
你可以试试这样的:
字符串
在执行该程序时,请尝试以下操作:
型
你需要这个吗?